Date: (Sat) Jun 04, 2016
Data: Source: Training: “https://inclass.kaggle.com/c/can-we-predict-voting-outcomes/download/train2016.csv”
New: “https://inclass.kaggle.com/c/can-we-predict-voting-outcomes/download/test2016.csv”
Time period:
Based on analysis utilizing <> techniques,
Summary of key steps & error improvement stats:
Use plot.ly for interactive plots ?
varImp for randomForest crashes in caret version:6.0.41 -> submit bug report
extensions toward multiclass classification are scheduled for the next release
rm(list = ls())
set.seed(12345)
options(stringsAsFactors = FALSE)
source("~/Dropbox/datascience/R/mycaret.R")
source("~/Dropbox/datascience/R/mypetrinet.R")
source("~/Dropbox/datascience/R/myplclust.R")
source("~/Dropbox/datascience/R/myplot.R")
source("~/Dropbox/datascience/R/myscript.R")
source("~/Dropbox/datascience/R/mytm.R")
if (is.null(knitr::opts_current$get(name = 'label'))) # Running in IDE
debugSource("~/Dropbox/datascience/R/mydsutils.R") else
source("~/Dropbox/datascience/R/mydsutils.R")
## Loading required package: caret
## Loading required package: lattice
# Gather all package requirements here
suppressPackageStartupMessages(require(doMC))
glbCores <- 6 # of cores on machine - 2
registerDoMC(glbCores)
suppressPackageStartupMessages(require(caret))
require(plyr)
## Loading required package: plyr
require(dplyr)
## Loading required package: dplyr
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:plyr':
##
## arrange, count, desc, failwith, id, mutate, rename, summarise,
## summarize
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
require(knitr)
## Loading required package: knitr
require(stringr)
## Loading required package: stringr
#source("dbgcaret.R")
#packageVersion("snow")
#require(sos); findFn("cosine", maxPages=2, sortby="MaxScore")
# Analysis control global variables
# Inputs
# url/name = "<PathPointer>"; if url specifies a zip file, name = "<filename>";
# or named collection of <PathPointer>s
# sep = choose from c(NULL, "\t")
glbObsTrnFile <- list(url = "https://inclass.kaggle.com/c/can-we-predict-voting-outcomes/download/train2016.csv"
# or list(url = c(NULL, <.inp1> = "<path1>", <.inp2> = "<path2>"))
#, splitSpecs = list(method = "copy" # default when glbObsNewFile is NULL
# select from c("copy", NULL ???, "condition", "sample", )
# ,nRatio = 0.3 # > 0 && < 1 if method == "sample"
# ,seed = 123 # any integer or glbObsTrnPartitionSeed if method == "sample"
# ,condition = # or 'is.na(<var>)'; '<var> <condition_operator> <value>'
# )
)
glbObsNewFile <- list(url = "https://inclass.kaggle.com/c/can-we-predict-voting-outcomes/download/test2016.csv")
glbObsDropCondition <- NULL # : default
# enclose in single-quotes b/c condition might include double qoutes
# use | & ; NOT || &&
# '<condition>'
# 'grepl("^First Draft Video:", glbObsAll$Headline)'
# 'is.na(glbObsAll[, glb_rsp_var_raw])'
# '(is.na(glbObsAll[, glb_rsp_var_raw]) & grepl("Train", glbObsAll[, glbFeatsId]))'
# 'is.na(strptime(glbObsAll[, "Date"], glbFeatsDateTime[["Date"]]["format"], tz = glbFeatsDateTime[["Date"]]["timezone"]))'
#nrow(do.call("subset",list(glbObsAll, parse(text=paste0("!(", glbObsDropCondition, ")")))))
glb_obs_repartition_train_condition <- NULL # : default
# "<condition>"
glb_max_fitobs <- NULL # or any integer
glbObsTrnPartitionSeed <- 123 # or any integer
glb_is_regression <- FALSE; glb_is_classification <- !glb_is_regression;
glb_is_binomial <- TRUE # or TRUE or FALSE
glb_rsp_var_raw <- "Party"
# for classification, the response variable has to be a factor
glb_rsp_var <- "Party.fctr"
# if the response factor is based on numbers/logicals e.g (0/1 OR TRUE/FALSE vs. "A"/"B"),
# or contains spaces (e.g. "Not in Labor Force")
# caret predict(..., type="prob") crashes
glb_map_rsp_raw_to_var <- #NULL
function(raw) {
# return(raw ^ 0.5)
# return(log(raw))
# return(log(1 + raw))
# return(log10(raw))
# return(exp(-raw / 2))
#
# chk ref value against frequencies vs. alpha sort order
ret_vals <- rep_len(NA, length(raw)); ret_vals[!is.na(raw)] <- ifelse(raw[!is.na(raw)] == "Republican", "R", "D"); return(relevel(as.factor(ret_vals), ref = "D"))
# as.factor(paste0("B", raw))
# as.factor(gsub(" ", "\\.", raw))
}
#if glb_rsp_var_raw is numeric:
#print(summary(glbObsAll[, glb_rsp_var_raw]))
#glb_map_rsp_raw_to_var(tst <- c(NA, as.numeric(summary(glbObsAll[, glb_rsp_var_raw]))))
#if glb_rsp_var_raw is character:
#print(table(glbObsAll[, glb_rsp_var_raw], useNA = "ifany"))
# print(table(glb_map_rsp_raw_to_var(tst <- glbObsAll[, glb_rsp_var_raw]), useNA = "ifany"))
glb_map_rsp_var_to_raw <- #NULL
function(var) {
# return(var ^ 2.0)
# return(exp(var))
# return(10 ^ var)
# return(-log(var) * 2)
# as.numeric(var)
# levels(var)[as.numeric(var)]
sapply(levels(var)[as.numeric(var)], function(elm)
if (is.na(elm)) return(elm) else
if (elm == 'R') return("Republican") else
if (elm == 'D') return("Democrat") else
stop("glb_map_rsp_var_to_raw: unexpected value: ", elm)
)
# gsub("\\.", " ", levels(var)[as.numeric(var)])
# c("<=50K", " >50K")[as.numeric(var)]
# c(FALSE, TRUE)[as.numeric(var)]
}
# print(table(glb_map_rsp_var_to_raw(glb_map_rsp_raw_to_var(tst)), useNA = "ifany"))
if ((glb_rsp_var != glb_rsp_var_raw) && is.null(glb_map_rsp_raw_to_var))
stop("glb_map_rsp_raw_to_var function expected")
# List info gathered for various columns
# <col_name>: <description>; <notes>
# USER_ID - an anonymous id unique to a given user
# YOB - the year of birth of the user
# Gender - the gender of the user, either Male or Female
# Income - the household income of the user. Either not provided, or one of "under $25,000", "$25,001 - $50,000", "$50,000 - $74,999", "$75,000 - $100,000", "$100,001 - $150,000", or "over $150,000".
# HouseholdStatus - the household status of the user. Either not provided, or one of "Domestic Partners (no kids)", "Domestic Partners (w/kids)", "Married (no kids)", "Married (w/kids)", "Single (no kids)", or "Single (w/kids)".
# EducationalLevel - the education level of the user. Either not provided, or one of "Current K-12", "High School Diploma", "Current Undergraduate", "Associate's Degree", "Bachelor's Degree", "Master's Degree", or "Doctoral Degree".
# Party - the political party for whom the user intends to vote for. Either "Democrat" or "Republican
# Q124742, Q124122, . . . , Q96024 - 101 different questions that the users were asked on Show of Hands. If the user didn't answer the question, there is a blank. For information about the question text and possible answers, see the file Questions.pdf.
# currently does not handle more than 1 column; consider concatenating multiple columns
# If glbFeatsId == NULL, ".rownames <- as.numeric(row.names())" is the default
glbFeatsId <- "USER_ID" # choose from c(NULL : default, "<id_feat>")
# glbFeatsCategory <- "Hhold.fctr" # choose from c(NULL : default, "<category_feat>")
glbFeatsCategory <- "Q109244.fctr" # choose from c(NULL : default, "<category_feat>") -> OOB performed worse than "Hhold.fctr"
# User-specified exclusions
glbFeatsExclude <- c(NULL
# Feats that shd be excluded due to known causation by prediction variable
# , "<feat1", "<feat2>"
# Feats that are factors with unique values (as % of nObs) > 49 (empirically derived)
# Feats that are linear combinations (alias in glm)
# Feature-engineering phase -> start by excluding all features except id & category &
# work each one in
, "USER_ID", "YOB", "Gender", "Income", "HouseholdStatus", "EducationLevel"
,"Q124742","Q124122"
,"Q123621","Q123464"
,"Q122771","Q122770","Q122769","Q122120"
,"Q121700","Q121699","Q121011"
,"Q120978","Q120650","Q120472","Q120379","Q120194","Q120014","Q120012"
,"Q119851","Q119650","Q119334"
,"Q118892","Q118237","Q118233","Q118232","Q118117"
,"Q117193","Q117186"
,"Q116797","Q116881","Q116953","Q116601","Q116441","Q116448","Q116197"
,"Q115602","Q115777","Q115610","Q115611","Q115899","Q115390","Q115195"
,"Q114961","Q114748","Q114517","Q114386","Q114152"
,"Q113992","Q113583","Q113584","Q113181"
,"Q112478","Q112512","Q112270"
,"Q111848","Q111580","Q111220"
,"Q110740"
,"Q109367","Q109244"
,"Q108950","Q108855","Q108617","Q108856","Q108754","Q108342","Q108343"
,"Q107869","Q107491"
,"Q106993","Q106997","Q106272","Q106388","Q106389","Q106042"
,"Q105840","Q105655"
,"Q104996"
,"Q103293"
,"Q102906","Q102674","Q102687","Q102289","Q102089"
,"Q101162","Q101163","Q101596"
,"Q100689","Q100680","Q100562","Q100010"
,"Q99982"
,"Q99716"
,"Q99581"
,"Q99480"
,"Q98869"
,"Q98578"
,"Q98197"
,"Q98059","Q98078"
,"Q96024" # Done
,".pos")
if (glb_rsp_var_raw != glb_rsp_var)
glbFeatsExclude <- union(glbFeatsExclude, glb_rsp_var_raw)
glbFeatsInteractionOnly <- list()
#glbFeatsInteractionOnly[["<child_feat>"]] <- "<parent_feat>"
glbFeatsInteractionOnly[["YOB.Age.dff"]] <- "YOB.Age.fctr"
glbFeatsDrop <- c(NULL
# , "<feat1>", "<feat2>"
)
glb_map_vars <- NULL # or c("<var1>", "<var2>")
glb_map_urls <- list();
# glb_map_urls[["<var1>"]] <- "<var1.url>"
# Derived features; Use this mechanism to cleanse data ??? Cons: Data duplication ???
glbFeatsDerive <- list();
# glbFeatsDerive[["<feat.my.sfx>"]] <- list(
# mapfn = function(<arg1>, <arg2>) { return(function(<arg1>, <arg2>)) }
# , args = c("<arg1>", "<arg2>"))
#myprint_df(data.frame(ImageId = mapfn(glbObsAll$.src, glbObsAll$.pos)))
#data.frame(ImageId = mapfn(glbObsAll$.src, glbObsAll$.pos))[7045:7055, ]
# character
# mapfn = function(Education) { raw <- Education; raw[is.na(raw)] <- "NA.my"; return(as.factor(raw)) }
# mapfn = function(Week) { return(substr(Week, 1, 10)) }
# mapfn = function(Name) { return(sapply(Name, function(thsName)
# str_sub(unlist(str_split(thsName, ","))[1], 1, 1))) }
# mapfn = function(descriptor) { return(plyr::revalue(descriptor, c(
# "ABANDONED BUILDING" = "OTHER",
# "**" = "**"
# ))) }
# mapfn = function(description) { mod_raw <- description;
# This is here because it does not work if it's in txt_map_filename
# mod_raw <- gsub(paste0(c("\n", "\211", "\235", "\317", "\333"), collapse = "|"), " ", mod_raw)
# Don't parse for "." because of ".com"; use customized gsub for that text
# mod_raw <- gsub("(\\w)(!|\\*|,|-|/)(\\w)", "\\1\\2 \\3", mod_raw);
# Some state acrnoyms need context for separation e.g.
# LA/L.A. could either be "Louisiana" or "LosAngeles"
# modRaw <- gsub("\\bL\\.A\\.( |,|')", "LosAngeles\\1", modRaw);
# OK/O.K. could either be "Oklahoma" or "Okay"
# modRaw <- gsub("\\bACA OK\\b", "ACA OKay", modRaw);
# modRaw <- gsub("\\bNow O\\.K\\.\\b", "Now OKay", modRaw);
# PR/P.R. could either be "PuertoRico" or "Public Relations"
# modRaw <- gsub("\\bP\\.R\\. Campaign", "PublicRelations Campaign", modRaw);
# VA/V.A. could either be "Virginia" or "VeteransAdministration"
# modRaw <- gsub("\\bthe V\\.A\\.\\:", "the VeteranAffairs:", modRaw);
#
# Custom mods
# return(mod_raw) }
# numeric
# Create feature based on record position/id in data
glbFeatsDerive[[".pos"]] <- list(
mapfn = function(raw1) { return(1:length(raw1)) }
, args = c(".rnorm"))
# glbFeatsDerive[[".pos.y"]] <- list(
# mapfn = function(raw1) { return(1:length(raw1)) }
# , args = c(".rnorm"))
# Add logs of numerics that are not distributed normally
# Derive & keep multiple transformations of the same feature, if normality is hard to achieve with just one transformation
# Right skew: logp1; sqrt; ^ 1/3; logp1(logp1); log10; exp(-<feat>/constant)
# glbFeatsDerive[["WordCount.log1p"]] <- list(
# mapfn = function(WordCount) { return(log1p(WordCount)) }
# , args = c("WordCount"))
# glbFeatsDerive[["WordCount.root2"]] <- list(
# mapfn = function(WordCount) { return(WordCount ^ (1/2)) }
# , args = c("WordCount"))
# glbFeatsDerive[["WordCount.nexp"]] <- list(
# mapfn = function(WordCount) { return(exp(-WordCount)) }
# , args = c("WordCount"))
#print(summary(glbObsAll$WordCount))
#print(summary(mapfn(glbObsAll$WordCount)))
# If imputation shd be skipped for this feature
# glbFeatsDerive[["District.fctr"]] <- list(
# mapfn = function(District) {
# raw <- District;
# ret_vals <- rep_len("NA", length(raw));
# ret_vals[!is.na(raw)] <- sapply(raw[!is.na(raw)], function(elm)
# ifelse(elm < 10, "1-9",
# ifelse(elm < 20, "10-19", "20+")));
# return(relevel(as.factor(ret_vals), ref = "NA"))
# }
# , args = c("District"))
# YOB options:
# 1. Missing data:
# 1.1 0 -> Does not improve baseline
# 1.2 Cut factors & "NA" is a level
# 2. Data corrections: < 1928 & > 2000
# 3. Scale YOB
# 4. Add Age
# YOB.Age.fctr needs to be synced with YOB.Age.dff; Create a separate sub-function ???
glbFeatsDerive[["YOB.Age.fctr"]] <- list(
mapfn = function(raw1) {
raw <- 2016 - raw1
# raw[!is.na(raw) & raw >= 2010] <- NA
raw[!is.na(raw) & (raw <= 15)] <- NA
raw[!is.na(raw) & (raw >= 90)] <- NA
retVal <- rep_len("NA", length(raw))
# breaks = c(1879, seq(1949, 1989, 10), 2049)
# cutVal <- cut(raw[!is.na(raw)], breaks = breaks,
# labels = as.character(breaks + 1)[1:(length(breaks) - 1)])
cutVal <- cut(raw[!is.na(raw)], breaks = c(15, 20, 25, 30, 35, 40, 50, 65, 90))
retVal[!is.na(raw)] <- levels(cutVal)[cutVal]
return(factor(retVal, levels = c("NA"
,"(15,20]","(20,25]","(25,30]","(30,35]","(35,40]","(40,50]","(50,65]","(65,90]"),
ordered = TRUE))
}
, args = c("YOB"))
# YOB.Age.fctr needs to be synced with YOB.Age.dff; Create a separate sub-function ???
glbFeatsDerive[["YOB.Age.dff"]] <- list(
mapfn = function(raw1) {
raw <- 2016 - raw1
raw[!is.na(raw) & (raw <= 15)] <- NA
raw[!is.na(raw) & (raw >= 90)] <- NA
breaks <- c(15, 20, 25, 30, 35, 40, 50, 65, 90)
# retVal <- rep_len(0, length(raw))
stopifnot(sum(!is.na(raw) && (raw <= 15)) == 0)
stopifnot(sum(!is.na(raw) && (raw >= 90)) == 0)
# msk <- !is.na(raw) && (raw > 15) && (raw <= 20); if (sum(msk > 0)) retVal[msk] <- raw[msk] - 15
# msk <- !is.na(raw) && (raw > 20) && (raw <= 25); if (sum(msk > 0)) retVal[msk] <- raw[msk] - 20
# msk <- !is.na(raw) && (raw > 25) && (raw <= 30); if (sum(msk > 0)) retVal[msk] <- raw[msk] - 25
# msk <- !is.na(raw) && (raw > 30) && (raw <= 35); if (sum(msk > 0)) retVal[msk] <- raw[msk] - 30
# msk <- !is.na(raw) && (raw > 35) && (raw <= 40); if (sum(msk > 0)) retVal[msk] <- raw[msk] - 35
# msk <- !is.na(raw) && (raw > 40) && (raw <= 50); if (sum(msk > 0)) retVal[msk] <- raw[msk] - 40
# msk <- !is.na(raw) && (raw > 50) && (raw <= 65); if (sum(msk > 0)) retVal[msk] <- raw[msk] - 50
# msk <- !is.na(raw) && (raw > 65) && (raw <= 90); if (sum(msk > 0)) retVal[msk] <- raw[msk] - 65
breaks <- c(15, 20, 25, 30, 35, 40, 50, 65, 90)
retVal <- sapply(raw, function(age) {
if (is.na(age)) return(0) else
if ((age > 15) && (age <= 20)) return(age - 15) else
if ((age > 20) && (age <= 25)) return(age - 20) else
if ((age > 25) && (age <= 30)) return(age - 25) else
if ((age > 30) && (age <= 35)) return(age - 30) else
if ((age > 35) && (age <= 40)) return(age - 35) else
if ((age > 40) && (age <= 50)) return(age - 40) else
if ((age > 50) && (age <= 65)) return(age - 50) else
if ((age > 65) && (age <= 90)) return(age - 65)
})
return(retVal)
}
, args = c("YOB"))
glbFeatsDerive[["Gender.fctr"]] <- list(
mapfn = function(raw1) {
raw <- raw1
raw[raw %in% ""] <- "N"
raw <- gsub("Male" , "M", raw, fixed = TRUE)
raw <- gsub("Female", "F", raw, fixed = TRUE)
return(relevel(as.factor(raw), ref = "N"))
}
, args = c("Gender"))
glbFeatsDerive[["Income.fctr"]] <- list(
mapfn = function(raw1) { raw <- raw1;
raw[raw %in% ""] <- "N"
raw <- gsub("under $25,000" , "<25K" , raw, fixed = TRUE)
raw <- gsub("$25,001 - $50,000" , "25-50K" , raw, fixed = TRUE)
raw <- gsub("$50,000 - $74,999" , "50-75K" , raw, fixed = TRUE)
raw <- gsub("$75,000 - $100,000" , "75-100K" , raw, fixed = TRUE)
raw <- gsub("$100,001 - $150,000", "100-150K", raw, fixed = TRUE)
raw <- gsub("over $150,000" , ">150K" , raw, fixed = TRUE)
return(factor(raw, levels = c("N","<25K","25-50K","50-75K","75-100K","100-150K",">150K"),
ordered = TRUE))
}
, args = c("Income"))
glbFeatsDerive[["Hhold.fctr"]] <- list(
mapfn = function(raw1) { raw <- raw1;
raw[raw %in% ""] <- "N"
raw <- gsub("Domestic Partners (no kids)", "PKn", raw, fixed = TRUE)
raw <- gsub("Domestic Partners (w/kids)" , "PKy", raw, fixed = TRUE)
raw <- gsub("Married (no kids)" , "MKn", raw, fixed = TRUE)
raw <- gsub("Married (w/kids)" , "MKy", raw, fixed = TRUE)
raw <- gsub("Single (no kids)" , "SKn", raw, fixed = TRUE)
raw <- gsub("Single (w/kids)" , "SKy", raw, fixed = TRUE)
return(relevel(as.factor(raw), ref = "N"))
}
, args = c("HouseholdStatus"))
glbFeatsDerive[["Edn.fctr"]] <- list(
mapfn = function(raw1) { raw <- raw1;
raw[raw %in% ""] <- "N"
raw <- gsub("Current K-12" , "K12", raw, fixed = TRUE)
raw <- gsub("High School Diploma" , "HSD", raw, fixed = TRUE)
raw <- gsub("Current Undergraduate", "CCg", raw, fixed = TRUE)
raw <- gsub("Associate's Degree" , "Ast", raw, fixed = TRUE)
raw <- gsub("Bachelor's Degree" , "Bcr", raw, fixed = TRUE)
raw <- gsub("Master's Degree" , "Msr", raw, fixed = TRUE)
raw <- gsub("Doctoral Degree" , "PhD", raw, fixed = TRUE)
return(factor(raw, levels = c("N","K12","HSD","CCg","Ast","Bcr","Msr","PhD"),
ordered = TRUE))
}
, args = c("EducationLevel"))
# for (qsn in c("Q124742","Q124122"))
# for (qsn in grep("Q12(.{4})(?!\\.fctr)", names(glbObsTrn), value = TRUE, perl = TRUE))
for (qsn in grep("Q", glbFeatsExclude, fixed = TRUE, value = TRUE))
glbFeatsDerive[[paste0(qsn, ".fctr")]] <- list(
mapfn = function(raw1) {
raw1[raw1 %in% ""] <- "NA"
rawVal <- unique(raw1)
if (length(setdiff(rawVal, (expVal <- c("NA", "No", "Ys")))) == 0) {
raw1 <- gsub("Yes", "Ys", raw1, fixed = TRUE)
if (length(setdiff(rawVal, expVal)) > 0)
stop(qsn, " vals: ", paste0(rawVal, collapse = "|"),
" does not match expectation: ", paste0(expVal, collapse = "|"))
} else
if (length(setdiff(rawVal, (expVal <- c("NA", "Me", "Circumstances")))) == 0) {
raw1 <- gsub("Circumstances", "Cs", raw1, fixed = TRUE)
if (length(setdiff(rawVal, expVal)) > 0)
stop(qsn, " vals: ", paste0(rawVal, collapse = "|"),
" does not match expectation: ", paste0(expVal, collapse = "|"))
} else
if (length(setdiff(rawVal, (expVal <- c("NA", "Grrr people", "Yay people!")))) == 0) {
raw1 <- gsub("Grrr people", "Gr", raw1, fixed = TRUE)
raw1 <- gsub("Yay people!", "Yy", raw1, fixed = TRUE)
if (length(setdiff(rawVal, expVal)) > 0)
stop(qsn, " vals: ", paste0(rawVal, collapse = "|"),
" does not match expectation: ", paste0(expVal, collapse = "|"))
} else
if (length(setdiff(rawVal, (expVal <- c("NA", "Idealist", "Pragmatist")))) == 0) {
raw1 <- gsub("Idealist" , "Id", raw1, fixed = TRUE)
raw1 <- gsub("Pragmatist", "Pr", raw1, fixed = TRUE)
if (length(setdiff(rawVal, expVal)) > 0)
stop(qsn, " vals: ", paste0(rawVal, collapse = "|"),
" does not match expectation: ", paste0(expVal, collapse = "|"))
} else
if (length(setdiff(rawVal, (expVal <- c("NA", "Private", "Public")))) == 0) {
raw1 <- gsub("Private", "Pt", raw1, fixed = TRUE)
raw1 <- gsub("Public" , "Pc", raw1, fixed = TRUE)
if (length(setdiff(rawVal, expVal)) > 0)
stop(qsn, " vals: ", paste0(rawVal, collapse = "|"),
" does not match expectation: ", paste0(expVal, collapse = "|"))
}
return(relevel(as.factor(raw1), ref = "NA"))
}
, args = c(qsn))
# If imputation of missing data is not working ...
# glbFeatsDerive[["FertilityRate.nonNA"]] <- list(
# mapfn = function(FertilityRate, Region) {
# RegionMdn <- tapply(FertilityRate, Region, FUN = median, na.rm = TRUE)
#
# retVal <- FertilityRate
# retVal[is.na(FertilityRate)] <- RegionMdn[Region[is.na(FertilityRate)]]
# return(retVal)
# }
# , args = c("FertilityRate", "Region"))
# mapfn = function(HOSPI.COST) { return(cut(HOSPI.COST, 5, breaks = c(0, 100000, 200000, 300000, 900000), labels = NULL)) }
# mapfn = function(Rasmussen) { return(ifelse(sign(Rasmussen) >= 0, 1, 0)) }
# mapfn = function(startprice) { return(startprice ^ (1/2)) }
# mapfn = function(startprice) { return(log(startprice)) }
# mapfn = function(startprice) { return(exp(-startprice / 20)) }
# mapfn = function(startprice) { return(scale(log(startprice))) }
# mapfn = function(startprice) { return(sign(sprice.predict.diff) * (abs(sprice.predict.diff) ^ (1/10))) }
# factor
# mapfn = function(PropR) { return(as.factor(ifelse(PropR >= 0.5, "Y", "N"))) }
# mapfn = function(productline, description) { as.factor(gsub(" ", "", productline)) }
# mapfn = function(purpose) { return(relevel(as.factor(purpose), ref="all_other")) }
# mapfn = function(raw) { tfr_raw <- as.character(cut(raw, 5));
# tfr_raw[is.na(tfr_raw)] <- "NA.my";
# return(as.factor(tfr_raw)) }
# mapfn = function(startprice.log10) { return(cut(startprice.log10, 3)) }
# mapfn = function(startprice.log10) { return(cut(sprice.predict.diff, c(-1000, -100, -10, -1, 0, 1, 10, 100, 1000))) }
# , args = c("<arg1>"))
# multiple args
# mapfn = function(id, date) { return(paste(as.character(id), as.character(date), sep = "#")) }
# mapfn = function(PTS, oppPTS) { return(PTS - oppPTS) }
# mapfn = function(startprice.log10.predict, startprice) {
# return(spdiff <- (10 ^ startprice.log10.predict) - startprice) }
# mapfn = function(productline, description) { as.factor(
# paste(gsub(" ", "", productline), as.numeric(nchar(description) > 0), sep = "*")) }
# mapfn = function(.src, .pos) {
# return(paste(.src, sprintf("%04d",
# ifelse(.src == "Train", .pos, .pos - 7049)
# ), sep = "#")) }
# # If glbObsAll is not sorted in the desired manner
# mapfn=function(Week) { return(coredata(lag(zoo(orderBy(~Week, glbObsAll)$ILI), -2, na.pad=TRUE))) }
# mapfn=function(ILI) { return(coredata(lag(zoo(ILI), -2, na.pad=TRUE))) }
# mapfn=function(ILI.2.lag) { return(log(ILI.2.lag)) }
# glbFeatsDerive[["<var1>"]] <- glbFeatsDerive[["<var2>"]]
# tst <- "descr.my"; args_lst <- NULL; for (arg in glbFeatsDerive[[tst]]$args) args_lst[[arg]] <- glbObsAll[, arg]; print(head(args_lst[[arg]])); print(head(drv_vals <- do.call(glbFeatsDerive[[tst]]$mapfn, args_lst)));
# print(which_ix <- which(args_lst[[arg]] == 0.75)); print(drv_vals[which_ix]);
glbFeatsDateTime <- list()
# Use OlsonNames() to enumerate supported time zones
# glbFeatsDateTime[["<DateTimeFeat>"]] <-
# c(format = "%Y-%m-%d %H:%M:%S" or "%m/%e/%y", timezone = "US/Eastern", impute.na = TRUE,
# last.ctg = FALSE, poly.ctg = FALSE)
glbFeatsPrice <- NULL # or c("<price_var>")
glbFeatsImage <- list() #list(<imageFeat> = list(patchSize = 10)) # if patchSize not specified, no patch computation
glbFeatsText <- list()
Sys.setlocale("LC_ALL", "C") # For english
## [1] "C/C/C/C/C/en_US.UTF-8"
#glbFeatsText[["<TextFeature>"]] <- list(NULL,
# ,names = myreplacePunctuation(str_to_lower(gsub(" ", "", c(NULL,
# <comma-separated-screened-names>
# ))))
# ,rareWords = myreplacePunctuation(str_to_lower(gsub(" ", "", c(NULL,
# <comma-separated-nonSCOWL-words>
# ))))
#)
# Text Processing Step: custom modifications not present in txt_munge -> use glbFeatsDerive
# Text Processing Step: universal modifications
glb_txt_munge_filenames_pfx <- "<projectId>_mytxt_"
# Text Processing Step: tolower
# Text Processing Step: myreplacePunctuation
# Text Processing Step: removeWords
glb_txt_stop_words <- list()
# Remember to use unstemmed words
if (length(glbFeatsText) > 0) {
require(tm)
require(stringr)
glb_txt_stop_words[["<txt_var>"]] <- sort(myreplacePunctuation(str_to_lower(gsub(" ", "", c(NULL
# Remove any words from stopwords
# , setdiff(myreplacePunctuation(stopwords("english")), c("<keep_wrd1>", <keep_wrd2>"))
# Remove salutations
,"mr","mrs","dr","Rev"
# Remove misc
#,"th" # Happy [[:digit::]]+th birthday
# Remove terms present in Trn only or New only; search for "Partition post-stem"
# ,<comma-separated-terms>
# cor.y.train == NA
# ,unlist(strsplit(paste(c(NULL
# ,"<comma-separated-terms>"
# ), collapse=",")
# freq == 1; keep c("<comma-separated-terms-to-keep>")
# ,<comma-separated-terms>
# chisq.pval high (e.g. == 1); keep c("<comma-separated-terms-to-keep>")
# ,<comma-separated-terms>
# nzv.freqRatio high (e.g. >= glbFeatsNzvFreqMax); keep c("<comma-separated-terms-to-keep>")
# ,<comma-separated-terms>
)))))
}
#orderBy(~term, glb_post_stem_words_terms_df_lst[[txtFeat]][grep("^man", glb_post_stem_words_terms_df_lst[[txtFeat]]$term), ])
#glbObsAll[glb_post_stem_words_terms_mtrx_lst[[txtFeat]][, 4866] > 0, c(glb_rsp_var, txtFeat)]
# To identify terms with a specific freq
#paste0(sort(subset(glb_post_stop_words_terms_df_lst[[txtFeat]], freq == 1)$term), collapse = ",")
#paste0(sort(subset(glb_post_stem_words_terms_df_lst[[txtFeat]], freq <= 2)$term), collapse = ",")
#subset(glb_post_stem_words_terms_df_lst[[txtFeat]], term %in% c("zinger"))
# To identify terms with a specific freq &
# are not stemmed together later OR is value of color.fctr (e.g. gold)
#paste0(sort(subset(glb_post_stop_words_terms_df_lst[[txtFeat]], (freq == 1) & !(term %in% c("blacked","blemish","blocked","blocks","buying","cables","careful","carefully","changed","changing","chargers","cleanly","cleared","connect","connects","connected","contains","cosmetics","default","defaulting","defective","definitely","describe","described","devices","displays","drop","drops","engravement","excellant","excellently","feels","fix","flawlessly","frame","framing","gentle","gold","guarantee","guarantees","handled","handling","having","install","iphone","iphones","keeped","keeps","known","lights","line","lining","liquid","liquidation","looking","lots","manuals","manufacture","minis","most","mostly","network","networks","noted","opening","operated","performance","performs","person","personalized","photograph","physically","placed","places","powering","pre","previously","products","protection","purchasing","returned","rotate","rotation","running","sales","second","seconds","shipped","shuts","sides","skin","skinned","sticker","storing","thats","theres","touching","unusable","update","updates","upgrade","weeks","wrapped","verified","verify") ))$term), collapse = ",")
#print(subset(glb_post_stem_words_terms_df_lst[[txtFeat]], (freq <= 2)))
#glbObsAll[which(terms_mtrx[, 229] > 0), glbFeatsText]
# To identify terms with cor.y == NA
#orderBy(~-freq+term, subset(glb_post_stop_words_terms_df_lst[[txtFeat]], is.na(cor.y)))
#paste(sort(subset(glb_post_stop_words_terms_df_lst[[txtFeat]], is.na(cor.y))[, "term"]), collapse=",")
#orderBy(~-freq+term, subset(glb_post_stem_words_terms_df_lst[[txtFeat]], is.na(cor.y)))
# To identify terms with low cor.y.abs
#head(orderBy(~cor.y.abs+freq+term, subset(glb_post_stem_words_terms_df_lst[[txtFeat]], !is.na(cor.y))), 5)
# To identify terms with high chisq.pval
#subset(glb_post_stem_words_terms_df_lst[[txtFeat]], chisq.pval > 0.99)
#paste0(sort(subset(glb_post_stem_words_terms_df_lst[[txtFeat]], (chisq.pval > 0.99) & (freq <= 10))$term), collapse=",")
#paste0(sort(subset(glb_post_stem_words_terms_df_lst[[txtFeat]], (chisq.pval > 0.9))$term), collapse=",")
#head(orderBy(~-chisq.pval+freq+term, glb_post_stem_words_terms_df_lst[[txtFeat]]), 5)
#glbObsAll[glb_post_stem_words_terms_mtrx_lst[[txtFeat]][, 68] > 0, glbFeatsText]
#orderBy(~term, glb_post_stem_words_terms_df_lst[[txtFeat]][grep("^m", glb_post_stem_words_terms_df_lst[[txtFeat]]$term), ])
# To identify terms with high nzv.freqRatio
#summary(glb_post_stem_words_terms_df_lst[[txtFeat]]$nzv.freqRatio)
#paste0(sort(setdiff(subset(glb_post_stem_words_terms_df_lst[[txtFeat]], (nzv.freqRatio >= glbFeatsNzvFreqMax) & (freq < 10) & (chisq.pval >= 0.05))$term, c( "128gb","3g","4g","gold","ipad1","ipad3","ipad4","ipadair2","ipadmini2","manufactur","spacegray","sprint","tmobil","verizon","wifion"))), collapse=",")
# To identify obs with a txt term
#tail(orderBy(~-freq+term, glb_post_stop_words_terms_df_lst[[txtFeat]]), 20)
#mydspObs(list(descr.my.contains="non"), cols=c("color", "carrier", "cellular", "storage"))
#grep("ever", dimnames(terms_stop_mtrx)$Terms)
#which(terms_stop_mtrx[, grep("ipad", dimnames(terms_stop_mtrx)$Terms)] > 0)
#glbObsAll[which(terms_stop_mtrx[, grep("16", dimnames(terms_stop_mtrx)$Terms)[1]] > 0), c(glbFeatsCategory, "storage", txtFeat)]
# Text Processing Step: screen for names # Move to glbFeatsText specs section in order of text processing steps
# glbFeatsText[["<txtFeat>"]]$names <- myreplacePunctuation(str_to_lower(gsub(" ", "", c(NULL
# # Person names for names screening
# ,<comma-separated-list>
#
# # Company names
# ,<comma-separated-list>
#
# # Product names
# ,<comma-separated-list>
# ))))
# glbFeatsText[["<txtFeat>"]]$rareWords <- myreplacePunctuation(str_to_lower(gsub(" ", "", c(NULL
# # Words not in SCOWL db
# ,<comma-separated-list>
# ))))
# To identify char vectors post glbFeatsTextMap
#grep("six(.*)hour", glb_txt_chr_lst[[txtFeat]], ignore.case = TRUE, value = TRUE)
#grep("[S|s]ix(.*)[H|h]our", glb_txt_chr_lst[[txtFeat]], value = TRUE)
# To identify whether terms shd be synonyms
#orderBy(~term, glb_post_stop_words_terms_df_lst[[txtFeat]][grep("^moder", glb_post_stop_words_terms_df_lst[[txtFeat]]$term), ])
# term_row_df <- glb_post_stop_words_terms_df_lst[[txtFeat]][grep("^came$", glb_post_stop_words_terms_df_lst[[txtFeat]]$term), ]
#
# cor(glb_post_stop_words_terms_mtrx_lst[[txtFeat]][glbObsAll$.lcn == "Fit", term_row_df$pos], glbObsTrn[, glb_rsp_var], use="pairwise.complete.obs")
# To identify which stopped words are "close" to a txt term
#sort(glbFeatsCluster)
# Text Processing Step: stemDocument
# To identify stemmed txt terms
#glb_post_stop_words_terms_df_lst[[txtFeat]][grep("^la$", glb_post_stop_words_terms_df_lst[[txtFeat]]$term), ]
#orderBy(~term, glb_post_stem_words_terms_df_lst[[txtFeat]][grep("^con", glb_post_stem_words_terms_df_lst[[txtFeat]]$term), ])
#glbObsAll[which(terms_stem_mtrx[, grep("use", dimnames(terms_stem_mtrx)$Terms)[[1]]] > 0), c(glbFeatsId, "productline", txtFeat)]
#glbObsAll[which(TfIdf_stem_mtrx[, 191] > 0), c(glbFeatsId, glbFeatsCategory, txtFeat)]
#glbObsAll[which(glb_post_stop_words_terms_mtrx_lst[[txtFeat]][, 6165] > 0), c(glbFeatsId, glbFeatsCategory, txtFeat)]
#which(glbObsAll$UniqueID %in% c(11915, 11926, 12198))
# Text Processing Step: mycombineSynonyms
# To identify which terms are associated with not -> combine "could not" & "couldn't"
#findAssocs(glb_full_DTM_lst[[txtFeat]], "not", 0.05)
# To identify which synonyms should be combined
#orderBy(~term, glb_post_stem_words_terms_df_lst[[txtFeat]][grep("^c", glb_post_stem_words_terms_df_lst[[txtFeat]]$term), ])
chk_comb_cor <- function(syn_lst) {
# cor(terms_stem_mtrx[glbObsAll$.src == "Train", grep("^(damag|dent|ding)$", dimnames(terms_stem_mtrx)[[2]])], glbObsTrn[, glb_rsp_var], use="pairwise.complete.obs")
print(subset(glb_post_stem_words_terms_df_lst[[txtFeat]], term %in% syn_lst$syns))
print(subset(get_corpus_terms(tm_map(glbFeatsTextCorpus[[txtFeat]], mycombineSynonyms, list(syn_lst), lazy=FALSE)), term == syn_lst$word))
# cor(terms_stop_mtrx[glbObsAll$.src == "Train", grep("^(damage|dent|ding)$", dimnames(terms_stop_mtrx)[[2]])], glbObsTrn[, glb_rsp_var], use="pairwise.complete.obs")
# cor(rowSums(terms_stop_mtrx[glbObsAll$.src == "Train", grep("^(damage|dent|ding)$", dimnames(terms_stop_mtrx)[[2]])]), glbObsTrn[, glb_rsp_var], use="pairwise.complete.obs")
}
#chk_comb_cor(syn_lst=list(word="cabl", syns=c("cabl", "cord")))
#chk_comb_cor(syn_lst=list(word="damag", syns=c("damag", "dent", "ding")))
#chk_comb_cor(syn_lst=list(word="dent", syns=c("dent", "ding")))
#chk_comb_cor(syn_lst=list(word="use", syns=c("use", "usag")))
glbFeatsTextSynonyms <- list()
# list parsed to collect glbFeatsText[[<txtFeat>]]$vldTerms
# glbFeatsTextSynonyms[["Hdln.my"]] <- list(NULL
# # people in places
# , list(word = "australia", syns = c("australia", "australian"))
# , list(word = "italy", syns = c("italy", "Italian"))
# , list(word = "newyork", syns = c("newyork", "newyorker"))
# , list(word = "Pakistan", syns = c("Pakistan", "Pakistani"))
# , list(word = "peru", syns = c("peru", "peruvian"))
# , list(word = "qatar", syns = c("qatar", "qatari"))
# , list(word = "scotland", syns = c("scotland", "scotish"))
# , list(word = "Shanghai", syns = c("Shanghai", "Shanzhai"))
# , list(word = "venezuela", syns = c("venezuela", "venezuelan"))
#
# # companies - needs to be data dependent
# # - e.g. ensure BNP in this experiment/feat always refers to BNPParibas
#
# # general synonyms
# , list(word = "Create", syns = c("Create","Creator"))
# , list(word = "cute", syns = c("cute","cutest"))
# , list(word = "Disappear", syns = c("Disappear","Fadeout"))
# , list(word = "teach", syns = c("teach", "taught"))
# , list(word = "theater", syns = c("theater", "theatre", "theatres"))
# , list(word = "understand", syns = c("understand", "understood"))
# , list(word = "weak", syns = c("weak", "weaken", "weaker", "weakest"))
# , list(word = "wealth", syns = c("wealth", "wealthi"))
#
# # custom synonyms (phrases)
#
# # custom synonyms (names)
# )
#glbFeatsTextSynonyms[["<txtFeat>"]] <- list(NULL
# , list(word="<stem1>", syns=c("<stem1>", "<stem1_2>"))
# )
for (txtFeat in names(glbFeatsTextSynonyms))
for (entryIx in 1:length(glbFeatsTextSynonyms[[txtFeat]])) {
glbFeatsTextSynonyms[[txtFeat]][[entryIx]]$word <-
str_to_lower(glbFeatsTextSynonyms[[txtFeat]][[entryIx]]$word)
glbFeatsTextSynonyms[[txtFeat]][[entryIx]]$syns <-
str_to_lower(glbFeatsTextSynonyms[[txtFeat]][[entryIx]]$syns)
}
glbFeatsTextSeed <- 181
# tm options include: check tm::weightSMART
glb_txt_terms_control <- list( # Gather model performance & run-time stats
# weighting = function(x) weightSMART(x, spec = "nnn")
# weighting = function(x) weightSMART(x, spec = "lnn")
# weighting = function(x) weightSMART(x, spec = "ann")
# weighting = function(x) weightSMART(x, spec = "bnn")
# weighting = function(x) weightSMART(x, spec = "Lnn")
#
weighting = function(x) weightSMART(x, spec = "ltn") # default
# weighting = function(x) weightSMART(x, spec = "lpn")
#
# weighting = function(x) weightSMART(x, spec = "ltc")
#
# weighting = weightBin
# weighting = weightTf
# weighting = weightTfIdf # : default
# termFreq selection criteria across obs: tm default: list(global=c(1, Inf))
, bounds = list(global = c(1, Inf))
# wordLengths selection criteria: tm default: c(3, Inf)
, wordLengths = c(1, Inf)
)
glb_txt_cor_var <- glb_rsp_var # : default # or c(<feat>)
# select one from c("union.top.val.cor", "top.cor", "top.val", default: "top.chisq", "sparse")
glbFeatsTextFilter <- "top.chisq"
glbFeatsTextTermsMax <- rep(10, length(glbFeatsText)) # :default
names(glbFeatsTextTermsMax) <- names(glbFeatsText)
# Text Processing Step: extractAssoc
glbFeatsTextAssocCor <- rep(1, length(glbFeatsText)) # :default
names(glbFeatsTextAssocCor) <- names(glbFeatsText)
# Remember to use stemmed terms
glb_important_terms <- list()
# Text Processing Step: extractPatterns (ngrams)
glbFeatsTextPatterns <- list()
#glbFeatsTextPatterns[[<txtFeat>>]] <- list()
#glbFeatsTextPatterns[[<txtFeat>>]] <- c(metropolitan.diary.colon = "Metropolitan Diary:")
# Have to set it even if it is not used
# Properties:
# numrows(glb_feats_df) << numrows(glbObsFit
# Select terms that appear in at least 0.2 * O(FP/FN(glbObsOOB)) ???
# numrows(glbObsOOB) = 1.1 * numrows(glbObsNew) ???
glb_sprs_thresholds <- NULL # or c(<txtFeat1> = 0.988, <txtFeat2> = 0.970, <txtFeat3> = 0.970)
glbFctrMaxUniqVals <- 20 # default: 20
glb_impute_na_data <- FALSE # or TRUE
glb_mice_complete.seed <- 144 # or any integer
glbFeatsCluster <- paste(grep("^Q.", glbFeatsExclude, value = TRUE), "fctr", sep = ".") # NULL : glbFeatsCluster <- c("YOB.Age.fctr", "Gender.fctr", "Income.fctr",
# # "Hhold.fctr",
# "Edn.fctr",
# paste(grep("^Q.", glbFeatsExclude, value = TRUE), "fctr", sep = ".")) # NULL : default or c("<feat1>", "<feat2>")
# glbFeatsCluster <- grep(paste0("[",
# toupper(paste0(substr(glbFeatsText, 1, 1), collapse = "")),
# "]\\.[PT]\\."),
# names(glbObsAll), value = TRUE)
glb_cluster.seed <- 189 # or any integer
glbClusterEntropyVar <- NULL # c(glb_rsp_var, as.factor(cut(glb_rsp_var, 3)), default: NULL)
glbFeatsClusterVarsExclude <- FALSE # default FALSE
glb_interaction_only_feats <- NULL # : default or c(<parent_feat> = "<child_feat>")
glbFeatsNzvFreqMax <- 19 # 19 : caret default
glbFeatsNzvUniqMin <- 10 # 10 : caret default
glbRFESizes <- list()
#glbRFESizes[["mdlFamily"]] <- c(4, 8, 16, 32, 64, 67, 68, 69) # Accuracy@69/70 = 0.8258
glbRFESizes[["RFE.X"]] <- c(96, 112, 120, 124, 128, 129, 130, 131, 132, 133, 135, 138, 142, 157, 187, 247) # accuracy(131) = 0.6285
glbRFESizes[["Final"]] <- c(8, 16, 32, 40, 44, 46, 48, 49, 50, 51, 52, 56, 64, 96, 128, 247) # accuracy(49) = 0.6164
glbObsFitOutliers <- list()
# If outliers.n >= 10; consider concatenation of interaction vars
# glbObsFitOutliers[["<mdlFamily>"]] <- c(NULL
# is.na(.rstudent)
# max(.rstudent)
# is.na(.dffits)
# .hatvalues >= 0.99
# -38,167,642 < minmax(.rstudent) < 49,649,823
# , <comma-separated-<glbFeatsId>>
# )
glbObsTrnOutliers <- list()
glbObsTrnOutliers[["Final"]] <- union(glbObsFitOutliers[["All.X"]],
c(NULL
))
# Modify mdlId to (build & extract) "<FamilyId>#<Fit|Trn>#<caretMethod>#<preProc1.preProc2>#<samplingMethod>"
glb_models_lst <- list(); glb_models_df <- data.frame()
# Add xgboost algorithm
# Regression
if (glb_is_regression) {
glbMdlMethods <- c(NULL
# deterministic
#, "lm", # same as glm
, "glm", "bayesglm", "glmnet"
, "rpart"
# non-deterministic
, "gbm", "rf"
# Unknown
, "nnet" , "avNNet" # runs 25 models per cv sample for tunelength=5
, "svmLinear", "svmLinear2"
, "svmPoly" # runs 75 models per cv sample for tunelength=5
, "svmRadial"
, "earth"
, "bagEarth" # Takes a long time
,"xgbLinear","xgbTree"
)
} else
# Classification - Add ada (auto feature selection)
if (glb_is_binomial)
glbMdlMethods <- c(NULL
# deterministic
, "bagEarth" # Takes a long time
, "glm", "bayesglm", "glmnet"
, "nnet"
, "rpart"
# non-deterministic
, "gbm"
, "avNNet" # runs 25 models per cv sample for tunelength=5
, "rf"
# Unknown
, "lda", "lda2"
# svm models crash when predict is called -> internal to kernlab it should call predict without .outcome
, "svmLinear", "svmLinear2"
, "svmPoly" # runs 75 models per cv sample for tunelength=5
, "svmRadial"
, "earth"
,"xgbLinear","xgbTree"
) else
glbMdlMethods <- c(NULL
# deterministic
,"glmnet"
# non-deterministic
,"rf"
# Unknown
,"gbm","rpart","xgbLinear","xgbTree"
)
glbMdlFamilies <- list(); glb_mdl_feats_lst <- list()
# family: Choose from c("RFE.X", "Csm.X", "All.X", "Best.Interact") %*% c(NUll, ".NOr", "Inc")
# RFE = "Recursive Feature Elimination"
# Csm = CuStoM
# NOr = No OutlieRs
# Inc = INteraCt
# methods: Choose from c(NULL, <method>, glbMdlMethods)
#glbMdlFamilies[["RFE.X"]] <- c("glmnet", "glm") # non-NULL vector is mandatory
if (glb_is_classification && !glb_is_binomial) {
# glm does not work for multinomial
glbMdlFamilies[["All.X"]] <- c("glmnet")
} else {
glbMdlFamilies[["All.X"]] <- c("glmnet", "glm")
}
glbMdlFamilies[["All.X.Inc"]] <- c("glmnet")
glbMdlFamilies[["RFE.X"]] <- c("glmnet")
# Check if interaction features make RFE better
# glbMdlFamilies[["CSM.X"]] <- setdiff(glbMdlMethods, c("lda", "lda2")) # crashing due to category:.clusterid ??? #c("glmnet", "glm") # non-NULL list is mandatory
# glb_mdl_feats_lst[["CSM.X"]] <- c(NULL
# , <comma-separated-features-vector>
# )
# dAFeats.CSM.X %<d-% c(NULL
# # Interaction feats up to varImp(RFE.X.glmnet) >= 50
# , <comma-separated-features-vector>
# , setdiff(myextract_actual_feats(predictors(glbRFEResults)), c(NULL
# , <comma-separated-features-vector>
# ))
# )
# glb_mdl_feats_lst[["CSM.X"]] <- "%<d-% dAFeats.CSM.X"
glbMdlFamilies[["Final"]] <- c(NULL) # NULL vector acceptable # c("glmnet", "glm")
glbMdlAllowParallel <- list()
#glbMdlAllowParallel[["Final##rcv#glmnet"]] <- FALSE
glbMdlAllowParallel[["All.X##rcv#glm"]] <- FALSE
glbMdlAllowParallel[["All.X#zv.pca#rcv#glmnet"]] <- FALSE
glbMdlAllowParallel[["All.X#ica#rcv#glmnet"]] <- FALSE
glbMdlAllowParallel[["RFE.X#zv.pca#rcv#glmnet"]] <- FALSE
glbMdlAllowParallel[["RFE.X#ica#rcv#glmnet"]] <- FALSE
glbMdlAllowParallel[["RFE.X#nzv.pca.spatialSign#rcv#glmnet"]] <- FALSE
glbMdlAllowParallel[["Final.RFE.X#zv.pca#rcv#glmnet"]] <- FALSE
# Check if tuning parameters make fit better; make it mdlFamily customizable ?
glbMdlTuneParams <- data.frame()
# When glmnet crashes at model$grid with error: ???
glmnetTuneParams <- rbind(data.frame()
,data.frame(parameter = "alpha", vals = "0.100 0.325 0.550 0.775 1.000")
,data.frame(parameter = "lambda", vals = "9.342e-02")
)
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams,
# cbind(data.frame(mdlId = "<mdlId>"),
# glmnetTuneParams))
#avNNet
# size=[1] 3 5 7 9; decay=[0] 1e-04 0.001 0.01 0.1; bag=[FALSE]; RMSE=1.3300906
#bagEarth
# degree=1 [2] 3; nprune=64 128 256 512 [1024]; RMSE=0.6486663 (up)
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams, rbind(data.frame()
# ,data.frame(method = "bagEarth", parameter = "nprune", vals = "256")
# ,data.frame(method = "bagEarth", parameter = "degree", vals = "2")
# ))
#earth
# degree=[1]; nprune=2 [9] 17 25 33; RMSE=0.1334478
#gbm
# shrinkage=0.05 [0.10] 0.15 0.20 0.25; n.trees=100 150 200 [250] 300; interaction.depth=[1] 2 3 4 5; n.minobsinnode=[10]; RMSE=0.2008313
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams, rbind(data.frame()
# ,data.frame(method = "gbm", parameter = "shrinkage", min = 0.05, max = 0.25, by = 0.05)
# ,data.frame(method = "gbm", parameter = "n.trees", min = 100, max = 300, by = 50)
# ,data.frame(method = "gbm", parameter = "interaction.depth", min = 1, max = 5, by = 1)
# ,data.frame(method = "gbm", parameter = "n.minobsinnode", min = 10, max = 10, by = 10)
# #seq(from=0.05, to=0.25, by=0.05)
# ))
#glmnet
# alpha=0.100 [0.325] 0.550 0.775 1.000; lambda=0.0005232693 0.0024288010 0.0112734954 [0.0523269304] 0.2428800957; RMSE=0.6164891
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams, rbind(data.frame()
# ,data.frame(method = "glmnet", parameter = "alpha", vals = "0.550 0.775 0.8875 0.94375 1.000")
# ,data.frame(method = "glmnet", parameter = "lambda", vals = "9.858855e-05 0.0001971771 0.0009152152 0.0042480525 0.0197177130")
# ))
#nnet
# size=3 5 [7] 9 11; decay=0.0001 0.001 0.01 [0.1] 0.2; RMSE=0.9287422
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams, rbind(data.frame()
# ,data.frame(method = "nnet", parameter = "size", vals = "3 5 7 9 11")
# ,data.frame(method = "nnet", parameter = "decay", vals = "0.0001 0.0010 0.0100 0.1000 0.2000")
# ))
#rf # Don't bother; results are not deterministic
# mtry=2 35 68 [101] 134; RMSE=0.1339974
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams, rbind(data.frame()
# ,data.frame(method = "rf", parameter = "mtry", vals = "2 5 9 13 17")
# ))
#rpart
# cp=0.020 [0.025] 0.030 0.035 0.040; RMSE=0.1770237
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams, rbind(data.frame()
# ,data.frame(method = "rpart", parameter = "cp", vals = "0.004347826 0.008695652 0.017391304 0.021739130 0.034782609")
# ))
#svmLinear
# C=0.01 0.05 [0.10] 0.50 1.00 2.00 3.00 4.00; RMSE=0.1271318; 0.1296718
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams, rbind(data.frame()
# ,data.frame(method = "svmLinear", parameter = "C", vals = "0.01 0.05 0.1 0.5 1")
# ))
#svmLinear2
# cost=0.0625 0.1250 [0.25] 0.50 1.00; RMSE=0.1276354
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams, rbind(data.frame()
# ,data.frame(method = "svmLinear2", parameter = "cost", vals = "0.0625 0.125 0.25 0.5 1")
# ))
#svmPoly
# degree=[1] 2 3 4 5; scale=0.01 0.05 [0.1] 0.5 1; C=0.50 1.00 [2.00] 3.00 4.00; RMSE=0.1276130
# glbMdlTuneParams <- myrbind_df(glbMdlTuneParams, rbind(data.frame()
# ,data.frame(method="svmPoly", parameter="degree", min=1, max=5, by=1) #seq(1, 5, 1)
# ,data.frame(method="svmPoly", parameter="scale", vals="0.01, 0.05, 0.1, 0.5, 1")
# ,data.frame(method="svmPoly", parameter="C", vals="0.50, 1.00, 2.00, 3.00, 4.00")
# ))
#svmRadial
# sigma=[0.08674323]; C=0.25 0.50 1.00 [2.00] 4.00; RMSE=0.1614957
#glb2Sav(); all.equal(sav_models_df, glb_models_df)
pkgPreprocMethods <-
# caret version: 6.0.068 # packageVersion("caret")
# operations are applied in this order: zero-variance filter, near-zero variance filter, Box-Cox/Yeo-Johnson/exponential transformation, centering, scaling, range, imputation, PCA, ICA then spatial sign
# *Impute methods needed only if NAs are fed to myfit_mdl
# Also, ordered.factor in caret creates features as Edn.fctr^4 which is treated as an exponent by bagImpute
c(NULL
,"zv", "nzv"
,"BoxCox", "YeoJohnson", "expoTrans"
,"center", "scale", "center.scale", "range"
,"knnImpute", "bagImpute", "medianImpute"
,"zv.pca", "ica", "spatialSign"
,"conditionalX")
glbMdlPreprocMethods <- list( # NULL # : default
"All.X" = list("glmnet" = union(setdiff(pkgPreprocMethods,
c("knnImpute", "bagImpute", "medianImpute")),
# NULL))
c("nzv.spatialSign")))
)
glbMdlPreprocMethods[["RFE.X"]] <- list("glmnet" = union(unlist(glbMdlPreprocMethods[["All.X"]]),
"nzv.pca.spatialSign"))
# Baseline prediction model feature(s)
glb_Baseline_mdl_var <- NULL # or c("<feat>")
glbMdlMetric_terms <- NULL # or matrix(c(
# 0,1,2,3,4,
# 2,0,1,2,3,
# 4,2,0,1,2,
# 6,4,2,0,1,
# 8,6,4,2,0
# ), byrow=TRUE, nrow=5)
glbMdlMetricSummary <- NULL # or "<metric_name>"
glbMdlMetricMaximize <- NULL # or FALSE (TRUE is not the default for both classification & regression)
glbMdlMetricSummaryFn <- NULL # or function(data, lev=NULL, model=NULL) {
# confusion_mtrx <- t(as.matrix(confusionMatrix(data$pred, data$obs)))
# #print(confusion_mtrx)
# #print(confusion_mtrx * glbMdlMetric_terms)
# metric <- sum(confusion_mtrx * glbMdlMetric_terms) / nrow(data)
# names(metric) <- glbMdlMetricSummary
# return(metric)
# }
glbMdlCheckRcv <- FALSE # Turn it on when needed; otherwise takes long time
glb_rcv_n_folds <- 3 # or NULL
glb_rcv_n_repeats <- 3 # or NULL
glb_clf_proba_threshold <- NULL # 0.5
# Model selection criteria
if (glb_is_regression)
glbMdlMetricsEval <- c("min.RMSE.OOB", "max.R.sq.OOB", "max.Adj.R.sq.fit", "min.RMSE.fit")
#glbMdlMetricsEval <- c("min.RMSE.fit", "max.R.sq.fit", "max.Adj.R.sq.fit")
if (glb_is_classification) {
if (glb_is_binomial)
glbMdlMetricsEval <-
c("max.Accuracy.OOB", "max.AUCROCR.OOB", "max.AUCpROC.OOB", "min.aic.fit", "max.Accuracy.fit") else
glbMdlMetricsEval <- c("max.Accuracy.OOB", "max.Kappa.OOB")
}
# select from NULL [no ensemble models], "auto" [all models better than MFO or Baseline], c(mdl_ids in glb_models_lst) [Typically top-rated models in auto]
glb_mdl_ensemble <- NULL
# "%<d-% setdiff(mygetEnsembleAutoMdlIds(), 'CSM.X.rf')"
# c(<comma-separated-mdlIds>
# )
# Only for classifications; for regressions remove "(.*)\\.prob" form the regex
# tmp_fitobs_df <- glbObsFit[, grep(paste0("^", gsub(".", "\\.", mygetPredictIds$value, fixed = TRUE), "CSM\\.X\\.(.*)\\.prob"), names(glbObsFit), value = TRUE)]; cor_mtrx <- cor(tmp_fitobs_df); cor_vctr <- sort(cor_mtrx[row.names(orderBy(~-Overall, varImp(glb_models_lst[["Ensemble.repeatedcv.glmnet"]])$imp))[1], ]); summary(cor_vctr); cor_vctr
#ntv.glm <- glm(reformulate(indepVar, glb_rsp_var), family = "binomial", data = glbObsFit)
#step.glm <- step(ntv.glm)
glbMdlSelId <- NULL #select from c(NULL, "All.X##rcv#glmnet", "RFE.X##rcv#glmnet", <mdlId>)
glbMdlFinId <- NULL #select from c(NULL, glbMdlSelId)
glb_dsp_cols <- c(".pos", glbFeatsId, glbFeatsCategory, glb_rsp_var
# List critical cols excl. above
)
# Output specs
# lclgetfltout_df <- function(obsOutFinDf) {
# require(tidyr)
# obsOutFinDf <- obsOutFinDf %>%
# tidyr::separate("ImageId.x.y", c(".src", ".pos", "x", "y"),
# sep = "#", remove = TRUE, extra = "merge")
# # mnm prefix stands for max_n_mean
# mnmout_df <- obsOutFinDf %>%
# dplyr::group_by(.pos) %>%
# #dplyr::top_n(1, Probability1) %>% # Score = 3.9426
# #dplyr::top_n(2, Probability1) %>% # Score = ???; weighted = 3.94254;
# #dplyr::top_n(3, Probability1) %>% # Score = 3.9418; weighted = 3.94169;
# dplyr::top_n(4, Probability1) %>% # Score = ???; weighted = 3.94149;
# #dplyr::top_n(5, Probability1) %>% # Score = 3.9421; weighted = 3.94178
#
# # dplyr::summarize(xMeanN = mean(as.numeric(x)), yMeanN = mean(as.numeric(y)))
# # dplyr::summarize(xMeanN = weighted.mean(as.numeric(x), Probability1), yMeanN = mean(as.numeric(y)))
# # dplyr::summarize(xMeanN = weighted.mean(as.numeric(x), c(Probability1, 0.2357323, 0.2336925)), yMeanN = mean(as.numeric(y)))
# # dplyr::summarize(xMeanN = weighted.mean(as.numeric(x), c(Probability1)), yMeanN = mean(as.numeric(y)))
# dplyr::summarize(xMeanN = weighted.mean(as.numeric(x), c(Probability1)),
# yMeanN = weighted.mean(as.numeric(y), c(Probability1)))
#
# maxout_df <- obsOutFinDf %>%
# dplyr::group_by(.pos) %>%
# dplyr::summarize(maxProb1 = max(Probability1))
# fltout_df <- merge(maxout_df, obsOutFinDf,
# by.x = c(".pos", "maxProb1"), by.y = c(".pos", "Probability1"),
# all.x = TRUE)
# fmnout_df <- merge(fltout_df, mnmout_df,
# by.x = c(".pos"), by.y = c(".pos"),
# all.x = TRUE)
# return(fmnout_df)
# }
glbObsOut <- list(NULL
# glbFeatsId will be the first output column, by default
,vars = list()
# ,mapFn = function(obsOutFinDf) {
# }
)
#obsOutFinDf <- savobsOutFinDf
# glbObsOut$mapFn <- function(obsOutFinDf) {
# txfout_df <- dplyr::select(obsOutFinDf, -.pos.y) %>%
# dplyr::mutate(
# lunch = levels(glbObsTrn[, "lunch" ])[
# round(mean(as.numeric(glbObsTrn[, "lunch" ])), 0)],
# dinner = levels(glbObsTrn[, "dinner" ])[
# round(mean(as.numeric(glbObsTrn[, "dinner" ])), 0)],
# reserve = levels(glbObsTrn[, "reserve" ])[
# round(mean(as.numeric(glbObsTrn[, "reserve" ])), 0)],
# outdoor = levels(glbObsTrn[, "outdoor" ])[
# round(mean(as.numeric(glbObsTrn[, "outdoor" ])), 0)],
# expensive = levels(glbObsTrn[, "expensive"])[
# round(mean(as.numeric(glbObsTrn[, "expensive"])), 0)],
# liquor = levels(glbObsTrn[, "liquor" ])[
# round(mean(as.numeric(glbObsTrn[, "liquor" ])), 0)],
# table = levels(glbObsTrn[, "table" ])[
# round(mean(as.numeric(glbObsTrn[, "table" ])), 0)],
# classy = levels(glbObsTrn[, "classy" ])[
# round(mean(as.numeric(glbObsTrn[, "classy" ])), 0)],
# kids = levels(glbObsTrn[, "kids" ])[
# round(mean(as.numeric(glbObsTrn[, "kids" ])), 0)]
# )
#
# print("ObsNew output class tables:")
# print(sapply(c("lunch","dinner","reserve","outdoor",
# "expensive","liquor","table",
# "classy","kids"),
# function(feat) table(txfout_df[, feat], useNA = "ifany")))
#
# txfout_df <- txfout_df %>%
# dplyr::mutate(labels = "") %>%
# dplyr::mutate(labels =
# ifelse(lunch != "-1", paste(labels, lunch ), labels)) %>%
# dplyr::mutate(labels =
# ifelse(dinner != "-1", paste(labels, dinner ), labels)) %>%
# dplyr::mutate(labels =
# ifelse(reserve != "-1", paste(labels, reserve ), labels)) %>%
# dplyr::mutate(labels =
# ifelse(outdoor != "-1", paste(labels, outdoor ), labels)) %>%
# dplyr::mutate(labels =
# ifelse(expensive != "-1", paste(labels, expensive), labels)) %>%
# dplyr::mutate(labels =
# ifelse(liquor != "-1", paste(labels, liquor ), labels)) %>%
# dplyr::mutate(labels =
# ifelse(table != "-1", paste(labels, table ), labels)) %>%
# dplyr::mutate(labels =
# ifelse(classy != "-1", paste(labels, classy ), labels)) %>%
# dplyr::mutate(labels =
# ifelse(kids != "-1", paste(labels, kids ), labels)) %>%
# dplyr::select(business_id, labels)
# return(txfout_df)
# }
#if (!is.null(glbObsOut$mapFn)) obsOutFinDf <- glbObsOut$mapFn(obsOutFinDf); print(head(obsOutFinDf))
glb_out_obs <- NULL # select from c(NULL : default to "new", "all", "new", "trn")
if (glb_is_classification && glb_is_binomial) {
# glbObsOut$vars[["Probability1"]] <-
# "%<d-% glbObsNew[, mygetPredictIds(glb_rsp_var, glbMdlFinId)$prob]"
# glbObsOut$vars[[glb_rsp_var_raw]] <-
# "%<d-% glb_map_rsp_var_to_raw(glbObsNew[,
# mygetPredictIds(glb_rsp_var, glbMdlFinId)$value])"
glbObsOut$vars[["Predictions"]] <-
"%<d-% glb_map_rsp_var_to_raw(glbObsNew[,
mygetPredictIds(glb_rsp_var, glbMdlFinId)$value])"
} else {
# glbObsOut$vars[[glbFeatsId]] <-
# "%<d-% as.integer(gsub('Test#', '', glbObsNew[, glbFeatsId]))"
glbObsOut$vars[[glb_rsp_var]] <-
"%<d-% glbObsNew[, mygetPredictIds(glb_rsp_var, glbMdlFinId)$value]"
# for (outVar in setdiff(glbFeatsExcludeLcl, glb_rsp_var_raw))
# glbObsOut$vars[[outVar]] <-
# paste0("%<d-% mean(glbObsAll[, \"", outVar, "\"], na.rm = TRUE)")
}
# glbObsOut$vars[[glb_rsp_var_raw]] <- glb_rsp_var_raw
# glbObsOut$vars[[paste0(head(unlist(strsplit(mygetPredictIds$value, "")), -1), collapse = "")]] <-
glbOutStackFnames <- NULL #: default
# c("ebayipads_txt_assoc1_out_bid1_stack.csv") # manual stack
# c("ebayipads_finmdl_bid1_out_nnet_1.csv") # universal stack
glbOut <- list(pfx = "Votes_RFEX_cnk04_fit_models_1_")
# lclImageSampleSeed <- 129
glbOutDataVizFname <- NULL # choose from c(NULL, "<projectId>_obsall.csv")
glbChunks <- list(labels = c("set_global_options_wd","set_global_options"
,"import.data","inspect.data","scrub.data","transform.data"
,"extract.features"
,"extract.features.datetime","extract.features.image","extract.features.price"
,"extract.features.text","extract.features.string"
,"extract.features.end"
,"manage.missing.data","cluster.data","partition.data.training","select.features"
,"fit.models_0","fit.models_1","fit.models_2","fit.models_3"
,"fit.data.training_0","fit.data.training_1"
,"predict.data.new"
,"display.session.info"))
# To ensure that all chunks in this script are in glbChunks
if (!is.null(chkChunksLabels <- knitr::all_labels()) && # knitr::all_labels() doesn't work in console runs
!identical(chkChunksLabels, glbChunks$labels)) {
print(sprintf("setdiff(chkChunksLabels, glbChunks$labels): %s",
setdiff(chkChunksLabels, glbChunks$labels)))
print(sprintf("setdiff(glbChunks$labels, chkChunksLabels): %s",
setdiff(glbChunks$labels, chkChunksLabels)))
}
glbChunks[["first"]] <- "fit.models_1" #default: script will load envir from previous chunk
glbChunks[["last" ]] <- "fit.models_1" #default: script will save envir at end of this chunk
glbChunks[["inpFilePathName"]] <- "data/Votes_AllX_pproc_cnk02_fit_models_1_fit.models_1.RData" # "data/<prvScriptName>_<lstChunkLbl>.RData"
#mysavChunk(glbOut$pfx, glbChunks[["last"]]) # called from myevlChunk
# Temporary: Delete this function (if any) from here after appropriate .RData file is saved
glbgetModelSelectFormula <- function() {
model_evl_terms <- c(NULL)
# min.aic.fit might not be avl
lclMdlEvlCriteria <-
glbMdlMetricsEval[glbMdlMetricsEval %in% names(glb_models_df)]
for (metric in lclMdlEvlCriteria)
model_evl_terms <- c(model_evl_terms,
ifelse(length(grep("max", metric)) > 0, "-", "+"), metric)
if (glb_is_classification && glb_is_binomial)
model_evl_terms <- c(model_evl_terms, "-", "opt.prob.threshold.OOB")
model_sel_frmla <- as.formula(paste(c("~ ", model_evl_terms), collapse = " "))
return(model_sel_frmla)
}
glbgetDisplayModelsDf <- function() {
dsp_models_cols <- c("id",
glbMdlMetricsEval[glbMdlMetricsEval %in% names(glb_models_df)],
grep("opt.", names(glb_models_df), fixed = TRUE, value = TRUE))
dsp_models_df <-
#orderBy(glbgetModelSelectFormula(), glb_models_df)[, c("id", glbMdlMetricsEval)]
orderBy(glbgetModelSelectFormula(), glb_models_df)[, dsp_models_cols]
nCvMdl <- sapply(glb_models_lst, function(mdl) nrow(mdl$results))
nParams <- sapply(glb_models_lst, function(mdl) ifelse(mdl$method == "custom", 0,
nrow(subset(modelLookup(mdl$method), parameter != "parameter"))))
# nCvMdl <- nCvMdl[names(nCvMdl) != "avNNet"]
# nParams <- nParams[names(nParams) != "avNNet"]
if (length(cvMdlProblems <- nCvMdl[nCvMdl <= nParams]) > 0) {
print("Cross Validation issues:")
warning("Cross Validation issues:")
print(cvMdlProblems)
}
pltMdls <- setdiff(names(nCvMdl), names(cvMdlProblems))
pltMdls <- setdiff(pltMdls, names(nParams[nParams == 0]))
# length(pltMdls) == 21
png(paste0(glbOut$pfx, "bestTune.png"), width = 480 * 2, height = 480 * 4)
grid.newpage()
pushViewport(viewport(layout = grid.layout(ceiling(length(pltMdls) / 2.0), 2)))
pltIx <- 1
for (mdlId in pltMdls) {
print(ggplot(glb_models_lst[[mdlId]], highBestTune = TRUE) + labs(title = mdlId),
vp = viewport(layout.pos.row = ceiling(pltIx / 2.0),
layout.pos.col = ((pltIx - 1) %% 2) + 1))
pltIx <- pltIx + 1
}
dev.off()
if (all(row.names(dsp_models_df) != dsp_models_df$id))
row.names(dsp_models_df) <- dsp_models_df$id
return(dsp_models_df)
}
# Inspect max OOB FP
#chkObsOOB <- subset(glbObsOOB, !label.fctr.All.X..rcv.glmnet.is.acc)
#chkObsOOBFP <- subset(chkObsOOB, label.fctr.All.X..rcv.glmnet == "left_eye_center") %>% dplyr::mutate(Probability1 = label.fctr.All.X..rcv.glmnet.prob) %>% select(-.src, -.pos, -x, -y) %>% lclgetfltout_df() %>% mutate(obj.distance = (((as.numeric(x) - left_eye_center_x.int) ^ 2) + ((as.numeric(y) - left_eye_center_y.int) ^ 2)) ^ 0.5) %>% dplyr::top_n(5, obj.distance) %>% dplyr::top_n(5, -patch.cor)
#
#newImgObs <- glbObsNew[(glbObsNew$ImageId == "Test#0001"), ]; print(newImgObs[which.max(newImgObs$label.fctr.Final..rcv.glmnet.prob), ])
#OOBImgObs <- glbObsOOB[(glbObsOOB$ImageId == "Train#0003"), ]; print(OOBImgObs[which.max(OOBImgObs$label.fctr.All.X..rcv.glmnet.prob), ])
#mygetImage(which(glbObsAll[, glbFeatsId] == "Train#0003"), names(glbFeatsImage)[1], plot = TRUE, featHighlight = c("left_eye_center_x", "left_eye_center_y"), ovrlHighlight = c(66, 35))
# Depict process
glb_analytics_pn <- petrinet(name = "glb_analytics_pn",
trans_df = data.frame(id = 1:6,
name = c("data.training.all","data.new",
"model.selected","model.final",
"data.training.all.prediction","data.new.prediction"),
x=c( -5,-5,-15,-25,-25,-35),
y=c( -5, 5, 0, 0, -5, 5)
),
places_df=data.frame(id=1:4,
name=c("bgn","fit.data.training.all","predict.data.new","end"),
x=c( -0, -20, -30, -40),
y=c( 0, 0, 0, 0),
M0=c( 3, 0, 0, 0)
),
arcs_df = data.frame(
begin = c("bgn","bgn","bgn",
"data.training.all","model.selected","fit.data.training.all",
"fit.data.training.all","model.final",
"data.new","predict.data.new",
"data.training.all.prediction","data.new.prediction"),
end = c("data.training.all","data.new","model.selected",
"fit.data.training.all","fit.data.training.all","model.final",
"data.training.all.prediction","predict.data.new",
"predict.data.new","data.new.prediction",
"end","end")
))
#print(ggplot.petrinet(glb_analytics_pn))
print(ggplot.petrinet(glb_analytics_pn) + coord_flip())
## Loading required package: grid
glb_analytics_avl_objs <- NULL
glb_chunks_df <- myadd_chunk(NULL,
ifelse(is.null(glbChunks$first), "import.data", glbChunks$first))
## label step_major step_minor label_minor bgn end elapsed
## 1 fit.models_1 1 0 0 9.653 NA NA
1.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_11.0: fit models_1fit.models_0_chunk_df <- myadd_chunk(NULL, "fit.models_0_bgn", label.minor = "setup")
# load(paste0(glbOut$pfx, "dsk.RData"))
glbgetModelSelectFormula <- function() {
model_evl_terms <- c(NULL)
# min.aic.fit might not be avl
lclMdlEvlCriteria <-
glbMdlMetricsEval[glbMdlMetricsEval %in% names(glb_models_df)]
for (metric in lclMdlEvlCriteria)
model_evl_terms <- c(model_evl_terms,
ifelse(length(grep("max", metric)) > 0, "-", "+"), metric)
if (glb_is_classification && glb_is_binomial)
model_evl_terms <- c(model_evl_terms, "-", "opt.prob.threshold.OOB")
model_sel_frmla <- as.formula(paste(c("~ ", model_evl_terms), collapse = " "))
return(model_sel_frmla)
}
glbgetDisplayModelsDf <- function() {
dsp_models_cols <- c("id",
glbMdlMetricsEval[glbMdlMetricsEval %in% names(glb_models_df)],
grep("opt.", names(glb_models_df), fixed = TRUE, value = TRUE))
dsp_models_df <-
#orderBy(glbgetModelSelectFormula(), glb_models_df)[, c("id", glbMdlMetricsEval)]
orderBy(glbgetModelSelectFormula(), glb_models_df)[, dsp_models_cols]
nCvMdl <- sapply(glb_models_lst, function(mdl) nrow(mdl$results))
nParams <- sapply(glb_models_lst, function(mdl) ifelse(mdl$method == "custom", 0,
nrow(subset(modelLookup(mdl$method), parameter != "parameter"))))
# nCvMdl <- nCvMdl[names(nCvMdl) != "avNNet"]
# nParams <- nParams[names(nParams) != "avNNet"]
if (length(cvMdlProblems <- nCvMdl[nCvMdl <= nParams]) > 0) {
print("Cross Validation issues:")
warning("Cross Validation issues:")
print(cvMdlProblems)
}
pltMdls <- setdiff(names(nCvMdl), names(cvMdlProblems))
pltMdls <- setdiff(pltMdls, names(nParams[nParams == 0]))
# length(pltMdls) == 21
png(paste0(glbOut$pfx, "bestTune.png"), width = 480 * 2, height = 480 * 4)
grid.newpage()
pushViewport(viewport(layout = grid.layout(ceiling(length(pltMdls) / 2.0), 2)))
pltIx <- 1
for (mdlId in pltMdls) {
print(ggplot(glb_models_lst[[mdlId]], highBestTune = TRUE) + labs(title = mdlId),
vp = viewport(layout.pos.row = ceiling(pltIx / 2.0),
layout.pos.col = ((pltIx - 1) %% 2) + 1))
pltIx <- pltIx + 1
}
dev.off()
if (all(row.names(dsp_models_df) != dsp_models_df$id))
row.names(dsp_models_df) <- dsp_models_df$id
return(dsp_models_df)
}
#glbgetDisplayModelsDf()
if (glb_is_classification && glb_is_binomial &&
(length(unique(glbObsFit[, glb_rsp_var])) < 2))
stop("glbObsFit$", glb_rsp_var, ": contains less than 2 unique values: ",
paste0(unique(glbObsFit[, glb_rsp_var]), collapse=", "))
max_cor_y_x_vars <- orderBy(~ -cor.y.abs,
subset(glb_feats_df, (exclude.as.feat == 0) & !nzv & !is.cor.y.abs.low &
is.na(cor.high.X)))[1:2, "id"]
max_cor_y_x_vars <- max_cor_y_x_vars[!is.na(max_cor_y_x_vars)]
if (length(max_cor_y_x_vars) < 2)
max_cor_y_x_vars <- union(max_cor_y_x_vars, ".pos")
if (!is.null(glb_Baseline_mdl_var)) {
if ((max_cor_y_x_vars[1] != glb_Baseline_mdl_var) &
(glb_feats_df[glb_feats_df$id == max_cor_y_x_vars[1], "cor.y.abs"] >
glb_feats_df[glb_feats_df$id == glb_Baseline_mdl_var, "cor.y.abs"]))
stop(max_cor_y_x_vars[1], " has a higher correlation with ", glb_rsp_var,
" than the Baseline var: ", glb_Baseline_mdl_var)
}
glb_model_type <- ifelse(glb_is_regression, "regression", "classification")
# Model specs
# c("id.prefix", "method", "type",
# # trainControl params
# "preProc.method", "cv.n.folds", "cv.n.repeats", "summary.fn",
# # train params
# "metric", "metric.maximize", "tune.df")
# Baseline
if (!is.null(glb_Baseline_mdl_var)) {
fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
paste0("fit.models_0_", "Baseline"), major.inc = FALSE,
label.minor = "mybaseln_classfr")
ret_lst <- myfit_mdl(mdl_id="Baseline",
model_method="mybaseln_classfr",
indepVar=glb_Baseline_mdl_var,
rsp_var=glb_rsp_var,
fit_df=glbObsFit, OOB_df=glbObsOOB)
}
# Most Frequent Outcome "MFO" model: mean(y) for regression
# Not using caret's nullModel since model stats not avl
# Cannot use rpart for multinomial classification since it predicts non-MFO
if (glb_is_classification) {
fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
paste0("fit.models_0_", "MFO"), major.inc = FALSE,
label.minor = "myMFO_classfr")
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "MFO", type = glb_model_type, trainControl.method = "none",
train.method = ifelse(glb_is_regression, "lm", "myMFO_classfr"))),
indepVar = ".rnorm", rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
# "random" model - only for classification;
# none needed for regression since it is same as MFO
fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
paste0("fit.models_0_", "Random"), major.inc = FALSE,
label.minor = "myrandom_classfr")
#stop(here"); glb2Sav(); all.equal(glb_models_df, sav_models_df)
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "Random", type = glb_model_type, trainControl.method = "none",
train.method = "myrandom_classfr")),
indepVar = ".rnorm", rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
}
# Max.cor.Y
# Check impact of cv
# rpart is not a good candidate since caret does not optimize cp (only tuning parameter of rpart) well
fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
paste0("fit.models_0_", "Max.cor.Y.rcv.*X*"), major.inc = FALSE,
label.minor = "glmnet")
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "Max.cor.Y.rcv.1X1", type = glb_model_type, trainControl.method = "none",
train.method = "glmnet")),
indepVar = max_cor_y_x_vars, rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
if (glbMdlCheckRcv) {
# rcv_n_folds == 1 & rcv_n_repeats > 1 crashes
for (rcv_n_folds in seq(3, glb_rcv_n_folds + 2, 2))
for (rcv_n_repeats in seq(1, glb_rcv_n_repeats + 2, 2)) {
# Experiment specific code to avoid caret crash
# lcl_tune_models_df <- rbind(data.frame()
# ,data.frame(method = "glmnet", parameter = "alpha",
# vals = "0.100 0.325 0.550 0.775 1.000")
# ,data.frame(method = "glmnet", parameter = "lambda",
# vals = "9.342e-02")
# )
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst =
list(
id.prefix = paste0("Max.cor.Y.rcv.", rcv_n_folds, "X", rcv_n_repeats),
type = glb_model_type,
# tune.df = lcl_tune_models_df,
trainControl.method = "repeatedcv",
trainControl.number = rcv_n_folds,
trainControl.repeats = rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
train.method = "glmnet", train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize)),
indepVar = max_cor_y_x_vars, rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
}
# Add parallel coordinates graph of glb_models_df[, glbMdlMetricsEval] to evaluate cv parameters
tmp_models_cols <- c("id", "max.nTuningRuns",
glbMdlMetricsEval[glbMdlMetricsEval %in% names(glb_models_df)],
grep("opt.", names(glb_models_df), fixed = TRUE, value = TRUE))
print(myplot_parcoord(obs_df = subset(glb_models_df,
grepl("Max.cor.Y.rcv.", id, fixed = TRUE),
select = -feats)[, tmp_models_cols],
id_var = "id"))
}
# Useful for stacking decisions
# fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
# paste0("fit.models_0_", "Max.cor.Y[rcv.1X1.cp.0|]"), major.inc = FALSE,
# label.minor = "rpart")
#
# ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
# id.prefix = "Max.cor.Y.rcv.1X1.cp.0", type = glb_model_type, trainControl.method = "none",
# train.method = "rpart",
# tune.df=data.frame(method="rpart", parameter="cp", min=0.0, max=0.0, by=0.1))),
# indepVar=max_cor_y_x_vars, rsp_var=glb_rsp_var,
# fit_df=glbObsFit, OOB_df=glbObsOOB)
#stop(here"); glb2Sav(); all.equal(glb_models_df, sav_models_df)
# if (glb_is_regression || glb_is_binomial) # For multinomials this model will be run next by default
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "Max.cor.Y",
type = glb_model_type, trainControl.method = "repeatedcv",
trainControl.number = glb_rcv_n_folds,
trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
trainControl.allowParallel = glbMdlAllowParallel,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = "rpart")),
indepVar = max_cor_y_x_vars, rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
if ((length(glbFeatsDateTime) > 0) &&
(sum(grepl(paste(names(glbFeatsDateTime), "\\.day\\.minutes\\.poly\\.", sep = ""),
names(glbObsAll))) > 0)) {
fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
paste0("fit.models_0_", "Max.cor.Y.Time.Poly"), major.inc = FALSE,
label.minor = "glmnet")
indepVars <- c(max_cor_y_x_vars,
grep(paste(names(glbFeatsDateTime), "\\.day\\.minutes\\.poly\\.", sep = ""),
names(glbObsAll), value = TRUE))
indepVars <- myadjustInteractionFeats(glb_feats_df, indepVars)
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "Max.cor.Y.Time.Poly",
type = glb_model_type, trainControl.method = "repeatedcv",
trainControl.number = glb_rcv_n_folds, trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
trainControl.allowParallel = glbMdlAllowParallel,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = "glmnet")),
indepVar = indepVars,
rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
}
if ((length(glbFeatsDateTime) > 0) &&
(sum(grepl(paste(names(glbFeatsDateTime), "\\.last[[:digit:]]", sep = ""),
names(glbObsAll))) > 0)) {
fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
paste0("fit.models_0_", "Max.cor.Y.Time.Lag"), major.inc = FALSE,
label.minor = "glmnet")
indepVars <- c(max_cor_y_x_vars,
grep(paste(names(glbFeatsDateTime), "\\.last[[:digit:]]", sep = ""),
names(glbObsAll), value = TRUE))
indepVars <- myadjustInteractionFeats(glb_feats_df, indepVars)
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "Max.cor.Y.Time.Lag",
type = glb_model_type,
tune.df = glbMdlTuneParams,
trainControl.method = "repeatedcv",
trainControl.number = glb_rcv_n_folds, trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
trainControl.allowParallel = glbMdlAllowParallel,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = "glmnet")),
indepVar = indepVars,
rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
}
if (length(glbFeatsText) > 0) {
fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
paste0("fit.models_0_", "Txt.*"), major.inc = FALSE,
label.minor = "glmnet")
indepVars <- c(max_cor_y_x_vars)
for (txtFeat in names(glbFeatsText))
indepVars <- union(indepVars,
grep(paste(str_to_upper(substr(txtFeat, 1, 1)), "\\.(?!([T|P]\\.))", sep = ""),
names(glbObsAll), perl = TRUE, value = TRUE))
indepVars <- myadjustInteractionFeats(glb_feats_df, indepVars)
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "Max.cor.Y.Text.nonTP",
type = glb_model_type,
tune.df = glbMdlTuneParams,
trainControl.method = "repeatedcv",
trainControl.number = glb_rcv_n_folds, trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
trainControl.allowParallel = glbMdlAllowParallel,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = "glmnet")),
indepVar = indepVars,
rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
indepVars <- c(max_cor_y_x_vars)
for (txtFeat in names(glbFeatsText))
indepVars <- union(indepVars,
grep(paste(str_to_upper(substr(txtFeat, 1, 1)), "\\.T\\.", sep = ""),
names(glbObsAll), perl = TRUE, value = TRUE))
indepVars <- myadjustInteractionFeats(glb_feats_df, indepVars)
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "Max.cor.Y.Text.onlyT",
type = glb_model_type,
tune.df = glbMdlTuneParams,
trainControl.method = "repeatedcv",
trainControl.number = glb_rcv_n_folds, trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = "glmnet")),
indepVar = indepVars,
rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
indepVars <- c(max_cor_y_x_vars)
for (txtFeat in names(glbFeatsText))
indepVars <- union(indepVars,
grep(paste(str_to_upper(substr(txtFeat, 1, 1)), "\\.P\\.", sep = ""),
names(glbObsAll), perl = TRUE, value = TRUE))
indepVars <- myadjustInteractionFeats(glb_feats_df, indepVars)
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "Max.cor.Y.Text.onlyP",
type = glb_model_type,
tune.df = glbMdlTuneParams,
trainControl.method = "repeatedcv",
trainControl.number = glb_rcv_n_folds, trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
trainControl.allowParallel = glbMdlAllowParallel,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = "glmnet")),
indepVar = indepVars,
rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
}
# Interactions.High.cor.Y
if (length(int_feats <- setdiff(setdiff(unique(glb_feats_df$cor.high.X), NA),
subset(glb_feats_df, nzv)$id)) > 0) {
fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
paste0("fit.models_0_", "Interact.High.cor.Y"), major.inc = FALSE,
label.minor = "glmnet")
ret_lst <- myfit_mdl(mdl_specs_lst=myinit_mdl_specs_lst(mdl_specs_lst=list(
id.prefix="Interact.High.cor.Y",
type=glb_model_type, trainControl.method="repeatedcv",
trainControl.number=glb_rcv_n_folds, trainControl.repeats=glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
trainControl.allowParallel = glbMdlAllowParallel,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method="glmnet")),
indepVar=c(max_cor_y_x_vars, paste(max_cor_y_x_vars[1], int_feats, sep=":")),
rsp_var=glb_rsp_var,
fit_df=glbObsFit, OOB_df=glbObsOOB)
}
# Low.cor.X
fit.models_0_chunk_df <- myadd_chunk(fit.models_0_chunk_df,
paste0("fit.models_0_", "Low.cor.X"), major.inc = FALSE,
label.minor = "glmnet")
indepVar <- mygetIndepVar(glb_feats_df)
ret_lst <- myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = "Low.cor.X",
type = glb_model_type,
tune.df = glbMdlTuneParams,
trainControl.method = "repeatedcv",
trainControl.number = glb_rcv_n_folds, trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
trainControl.allowParallel = glbMdlAllowParallel,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = "glmnet")),
indepVar = indepVar, rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
fit.models_0_chunk_df <-
myadd_chunk(fit.models_0_chunk_df, "fit.models_0_end", major.inc = FALSE,
label.minor = "teardown")
rm(ret_lst)
glb_chunks_df <- myadd_chunk(glb_chunks_df, "fit.models", major.inc = FALSE)
## label step_major step_minor label_minor bgn end elapsed
## 1 fit.models_1_bgn 1 0 setup 86.224 NA NA
## +(rfe) fit Fold1.Rep1 size: 247
## Warning in lda.default(x, grouping, ...): variables are collinear
## -(rfe) fit Fold1.Rep1 size: 247
## +(rfe) imp Fold1.Rep1
## -(rfe) imp Fold1.Rep1
## +(rfe) fit Fold1.Rep1 size: 187
## -(rfe) fit Fold1.Rep1 size: 187
## +(rfe) fit Fold1.Rep1 size: 157
## -(rfe) fit Fold1.Rep1 size: 157
## +(rfe) fit Fold1.Rep1 size: 142
## -(rfe) fit Fold1.Rep1 size: 142
## +(rfe) fit Fold1.Rep1 size: 138
## -(rfe) fit Fold1.Rep1 size: 138
## +(rfe) fit Fold1.Rep1 size: 135
## -(rfe) fit Fold1.Rep1 size: 135
## +(rfe) fit Fold1.Rep1 size: 133
## -(rfe) fit Fold1.Rep1 size: 133
## +(rfe) fit Fold1.Rep1 size: 132
## -(rfe) fit Fold1.Rep1 size: 132
## +(rfe) fit Fold1.Rep1 size: 131
## -(rfe) fit Fold1.Rep1 size: 131
## +(rfe) fit Fold1.Rep1 size: 130
## -(rfe) fit Fold1.Rep1 size: 130
## +(rfe) fit Fold1.Rep1 size: 129
## -(rfe) fit Fold1.Rep1 size: 129
## +(rfe) fit Fold1.Rep1 size: 128
## -(rfe) fit Fold1.Rep1 size: 128
## +(rfe) fit Fold1.Rep1 size: 124
## -(rfe) fit Fold1.Rep1 size: 124
## +(rfe) fit Fold1.Rep1 size: 120
## -(rfe) fit Fold1.Rep1 size: 120
## +(rfe) fit Fold1.Rep1 size: 112
## -(rfe) fit Fold1.Rep1 size: 112
## +(rfe) fit Fold1.Rep1 size: 96
## -(rfe) fit Fold1.Rep1 size: 96
## +(rfe) fit Fold2.Rep1 size: 247
## Warning in lda.default(x, grouping, ...): variables are collinear
## -(rfe) fit Fold2.Rep1 size: 247
## +(rfe) imp Fold2.Rep1
## -(rfe) imp Fold2.Rep1
## +(rfe) fit Fold2.Rep1 size: 187
## -(rfe) fit Fold2.Rep1 size: 187
## +(rfe) fit Fold2.Rep1 size: 157
## -(rfe) fit Fold2.Rep1 size: 157
## +(rfe) fit Fold2.Rep1 size: 142
## -(rfe) fit Fold2.Rep1 size: 142
## +(rfe) fit Fold2.Rep1 size: 138
## -(rfe) fit Fold2.Rep1 size: 138
## +(rfe) fit Fold2.Rep1 size: 135
## -(rfe) fit Fold2.Rep1 size: 135
## +(rfe) fit Fold2.Rep1 size: 133
## -(rfe) fit Fold2.Rep1 size: 133
## +(rfe) fit Fold2.Rep1 size: 132
## -(rfe) fit Fold2.Rep1 size: 132
## +(rfe) fit Fold2.Rep1 size: 131
## -(rfe) fit Fold2.Rep1 size: 131
## +(rfe) fit Fold2.Rep1 size: 130
## -(rfe) fit Fold2.Rep1 size: 130
## +(rfe) fit Fold2.Rep1 size: 129
## -(rfe) fit Fold2.Rep1 size: 129
## +(rfe) fit Fold2.Rep1 size: 128
## -(rfe) fit Fold2.Rep1 size: 128
## +(rfe) fit Fold2.Rep1 size: 124
## -(rfe) fit Fold2.Rep1 size: 124
## +(rfe) fit Fold2.Rep1 size: 120
## -(rfe) fit Fold2.Rep1 size: 120
## +(rfe) fit Fold2.Rep1 size: 112
## -(rfe) fit Fold2.Rep1 size: 112
## +(rfe) fit Fold2.Rep1 size: 96
## -(rfe) fit Fold2.Rep1 size: 96
## +(rfe) fit Fold3.Rep1 size: 247
## Warning in lda.default(x, grouping, ...): variables are collinear
## -(rfe) fit Fold3.Rep1 size: 247
## +(rfe) imp Fold3.Rep1
## -(rfe) imp Fold3.Rep1
## +(rfe) fit Fold3.Rep1 size: 187
## -(rfe) fit Fold3.Rep1 size: 187
## +(rfe) fit Fold3.Rep1 size: 157
## -(rfe) fit Fold3.Rep1 size: 157
## +(rfe) fit Fold3.Rep1 size: 142
## -(rfe) fit Fold3.Rep1 size: 142
## +(rfe) fit Fold3.Rep1 size: 138
## -(rfe) fit Fold3.Rep1 size: 138
## +(rfe) fit Fold3.Rep1 size: 135
## -(rfe) fit Fold3.Rep1 size: 135
## +(rfe) fit Fold3.Rep1 size: 133
## -(rfe) fit Fold3.Rep1 size: 133
## +(rfe) fit Fold3.Rep1 size: 132
## -(rfe) fit Fold3.Rep1 size: 132
## +(rfe) fit Fold3.Rep1 size: 131
## -(rfe) fit Fold3.Rep1 size: 131
## +(rfe) fit Fold3.Rep1 size: 130
## -(rfe) fit Fold3.Rep1 size: 130
## +(rfe) fit Fold3.Rep1 size: 129
## -(rfe) fit Fold3.Rep1 size: 129
## +(rfe) fit Fold3.Rep1 size: 128
## -(rfe) fit Fold3.Rep1 size: 128
## +(rfe) fit Fold3.Rep1 size: 124
## -(rfe) fit Fold3.Rep1 size: 124
## +(rfe) fit Fold3.Rep1 size: 120
## -(rfe) fit Fold3.Rep1 size: 120
## +(rfe) fit Fold3.Rep1 size: 112
## -(rfe) fit Fold3.Rep1 size: 112
## +(rfe) fit Fold3.Rep1 size: 96
## -(rfe) fit Fold3.Rep1 size: 96
## +(rfe) fit Fold1.Rep2 size: 247
## Warning in lda.default(x, grouping, ...): variables are collinear
## -(rfe) fit Fold1.Rep2 size: 247
## +(rfe) imp Fold1.Rep2
## -(rfe) imp Fold1.Rep2
## +(rfe) fit Fold1.Rep2 size: 187
## -(rfe) fit Fold1.Rep2 size: 187
## +(rfe) fit Fold1.Rep2 size: 157
## -(rfe) fit Fold1.Rep2 size: 157
## +(rfe) fit Fold1.Rep2 size: 142
## -(rfe) fit Fold1.Rep2 size: 142
## +(rfe) fit Fold1.Rep2 size: 138
## -(rfe) fit Fold1.Rep2 size: 138
## +(rfe) fit Fold1.Rep2 size: 135
## -(rfe) fit Fold1.Rep2 size: 135
## +(rfe) fit Fold1.Rep2 size: 133
## -(rfe) fit Fold1.Rep2 size: 133
## +(rfe) fit Fold1.Rep2 size: 132
## -(rfe) fit Fold1.Rep2 size: 132
## +(rfe) fit Fold1.Rep2 size: 131
## -(rfe) fit Fold1.Rep2 size: 131
## +(rfe) fit Fold1.Rep2 size: 130
## -(rfe) fit Fold1.Rep2 size: 130
## +(rfe) fit Fold1.Rep2 size: 129
## -(rfe) fit Fold1.Rep2 size: 129
## +(rfe) fit Fold1.Rep2 size: 128
## -(rfe) fit Fold1.Rep2 size: 128
## +(rfe) fit Fold1.Rep2 size: 124
## -(rfe) fit Fold1.Rep2 size: 124
## +(rfe) fit Fold1.Rep2 size: 120
## -(rfe) fit Fold1.Rep2 size: 120
## +(rfe) fit Fold1.Rep2 size: 112
## -(rfe) fit Fold1.Rep2 size: 112
## +(rfe) fit Fold1.Rep2 size: 96
## -(rfe) fit Fold1.Rep2 size: 96
## +(rfe) fit Fold2.Rep2 size: 247
## Warning in lda.default(x, grouping, ...): variables are collinear
## -(rfe) fit Fold2.Rep2 size: 247
## +(rfe) imp Fold2.Rep2
## -(rfe) imp Fold2.Rep2
## +(rfe) fit Fold2.Rep2 size: 187
## -(rfe) fit Fold2.Rep2 size: 187
## +(rfe) fit Fold2.Rep2 size: 157
## -(rfe) fit Fold2.Rep2 size: 157
## +(rfe) fit Fold2.Rep2 size: 142
## -(rfe) fit Fold2.Rep2 size: 142
## +(rfe) fit Fold2.Rep2 size: 138
## -(rfe) fit Fold2.Rep2 size: 138
## +(rfe) fit Fold2.Rep2 size: 135
## -(rfe) fit Fold2.Rep2 size: 135
## +(rfe) fit Fold2.Rep2 size: 133
## -(rfe) fit Fold2.Rep2 size: 133
## +(rfe) fit Fold2.Rep2 size: 132
## -(rfe) fit Fold2.Rep2 size: 132
## +(rfe) fit Fold2.Rep2 size: 131
## -(rfe) fit Fold2.Rep2 size: 131
## +(rfe) fit Fold2.Rep2 size: 130
## -(rfe) fit Fold2.Rep2 size: 130
## +(rfe) fit Fold2.Rep2 size: 129
## -(rfe) fit Fold2.Rep2 size: 129
## +(rfe) fit Fold2.Rep2 size: 128
## -(rfe) fit Fold2.Rep2 size: 128
## +(rfe) fit Fold2.Rep2 size: 124
## -(rfe) fit Fold2.Rep2 size: 124
## +(rfe) fit Fold2.Rep2 size: 120
## -(rfe) fit Fold2.Rep2 size: 120
## +(rfe) fit Fold2.Rep2 size: 112
## -(rfe) fit Fold2.Rep2 size: 112
## +(rfe) fit Fold2.Rep2 size: 96
## -(rfe) fit Fold2.Rep2 size: 96
## +(rfe) fit Fold3.Rep2 size: 247
## Warning in lda.default(x, grouping, ...): variables are collinear
## -(rfe) fit Fold3.Rep2 size: 247
## +(rfe) imp Fold3.Rep2
## -(rfe) imp Fold3.Rep2
## +(rfe) fit Fold3.Rep2 size: 187
## -(rfe) fit Fold3.Rep2 size: 187
## +(rfe) fit Fold3.Rep2 size: 157
## -(rfe) fit Fold3.Rep2 size: 157
## +(rfe) fit Fold3.Rep2 size: 142
## -(rfe) fit Fold3.Rep2 size: 142
## +(rfe) fit Fold3.Rep2 size: 138
## -(rfe) fit Fold3.Rep2 size: 138
## +(rfe) fit Fold3.Rep2 size: 135
## -(rfe) fit Fold3.Rep2 size: 135
## +(rfe) fit Fold3.Rep2 size: 133
## -(rfe) fit Fold3.Rep2 size: 133
## +(rfe) fit Fold3.Rep2 size: 132
## -(rfe) fit Fold3.Rep2 size: 132
## +(rfe) fit Fold3.Rep2 size: 131
## -(rfe) fit Fold3.Rep2 size: 131
## +(rfe) fit Fold3.Rep2 size: 130
## -(rfe) fit Fold3.Rep2 size: 130
## +(rfe) fit Fold3.Rep2 size: 129
## -(rfe) fit Fold3.Rep2 size: 129
## +(rfe) fit Fold3.Rep2 size: 128
## -(rfe) fit Fold3.Rep2 size: 128
## +(rfe) fit Fold3.Rep2 size: 124
## -(rfe) fit Fold3.Rep2 size: 124
## +(rfe) fit Fold3.Rep2 size: 120
## -(rfe) fit Fold3.Rep2 size: 120
## +(rfe) fit Fold3.Rep2 size: 112
## -(rfe) fit Fold3.Rep2 size: 112
## +(rfe) fit Fold3.Rep2 size: 96
## -(rfe) fit Fold3.Rep2 size: 96
## +(rfe) fit Fold1.Rep3 size: 247
## Warning in lda.default(x, grouping, ...): variables are collinear
## -(rfe) fit Fold1.Rep3 size: 247
## +(rfe) imp Fold1.Rep3
## -(rfe) imp Fold1.Rep3
## +(rfe) fit Fold1.Rep3 size: 187
## -(rfe) fit Fold1.Rep3 size: 187
## +(rfe) fit Fold1.Rep3 size: 157
## -(rfe) fit Fold1.Rep3 size: 157
## +(rfe) fit Fold1.Rep3 size: 142
## -(rfe) fit Fold1.Rep3 size: 142
## +(rfe) fit Fold1.Rep3 size: 138
## -(rfe) fit Fold1.Rep3 size: 138
## +(rfe) fit Fold1.Rep3 size: 135
## -(rfe) fit Fold1.Rep3 size: 135
## +(rfe) fit Fold1.Rep3 size: 133
## -(rfe) fit Fold1.Rep3 size: 133
## +(rfe) fit Fold1.Rep3 size: 132
## -(rfe) fit Fold1.Rep3 size: 132
## +(rfe) fit Fold1.Rep3 size: 131
## -(rfe) fit Fold1.Rep3 size: 131
## +(rfe) fit Fold1.Rep3 size: 130
## -(rfe) fit Fold1.Rep3 size: 130
## +(rfe) fit Fold1.Rep3 size: 129
## -(rfe) fit Fold1.Rep3 size: 129
## +(rfe) fit Fold1.Rep3 size: 128
## -(rfe) fit Fold1.Rep3 size: 128
## +(rfe) fit Fold1.Rep3 size: 124
## -(rfe) fit Fold1.Rep3 size: 124
## +(rfe) fit Fold1.Rep3 size: 120
## -(rfe) fit Fold1.Rep3 size: 120
## +(rfe) fit Fold1.Rep3 size: 112
## -(rfe) fit Fold1.Rep3 size: 112
## +(rfe) fit Fold1.Rep3 size: 96
## -(rfe) fit Fold1.Rep3 size: 96
## +(rfe) fit Fold2.Rep3 size: 247
## Warning in lda.default(x, grouping, ...): variables are collinear
## -(rfe) fit Fold2.Rep3 size: 247
## +(rfe) imp Fold2.Rep3
## -(rfe) imp Fold2.Rep3
## +(rfe) fit Fold2.Rep3 size: 187
## -(rfe) fit Fold2.Rep3 size: 187
## +(rfe) fit Fold2.Rep3 size: 157
## -(rfe) fit Fold2.Rep3 size: 157
## +(rfe) fit Fold2.Rep3 size: 142
## -(rfe) fit Fold2.Rep3 size: 142
## +(rfe) fit Fold2.Rep3 size: 138
## -(rfe) fit Fold2.Rep3 size: 138
## +(rfe) fit Fold2.Rep3 size: 135
## -(rfe) fit Fold2.Rep3 size: 135
## +(rfe) fit Fold2.Rep3 size: 133
## -(rfe) fit Fold2.Rep3 size: 133
## +(rfe) fit Fold2.Rep3 size: 132
## -(rfe) fit Fold2.Rep3 size: 132
## +(rfe) fit Fold2.Rep3 size: 131
## -(rfe) fit Fold2.Rep3 size: 131
## +(rfe) fit Fold2.Rep3 size: 130
## -(rfe) fit Fold2.Rep3 size: 130
## +(rfe) fit Fold2.Rep3 size: 129
## -(rfe) fit Fold2.Rep3 size: 129
## +(rfe) fit Fold2.Rep3 size: 128
## -(rfe) fit Fold2.Rep3 size: 128
## +(rfe) fit Fold2.Rep3 size: 124
## -(rfe) fit Fold2.Rep3 size: 124
## +(rfe) fit Fold2.Rep3 size: 120
## -(rfe) fit Fold2.Rep3 size: 120
## +(rfe) fit Fold2.Rep3 size: 112
## -(rfe) fit Fold2.Rep3 size: 112
## +(rfe) fit Fold2.Rep3 size: 96
## -(rfe) fit Fold2.Rep3 size: 96
## +(rfe) fit Fold3.Rep3 size: 247
## Warning in lda.default(x, grouping, ...): variables are collinear
## -(rfe) fit Fold3.Rep3 size: 247
## +(rfe) imp Fold3.Rep3
## -(rfe) imp Fold3.Rep3
## +(rfe) fit Fold3.Rep3 size: 187
## -(rfe) fit Fold3.Rep3 size: 187
## +(rfe) fit Fold3.Rep3 size: 157
## -(rfe) fit Fold3.Rep3 size: 157
## +(rfe) fit Fold3.Rep3 size: 142
## -(rfe) fit Fold3.Rep3 size: 142
## +(rfe) fit Fold3.Rep3 size: 138
## -(rfe) fit Fold3.Rep3 size: 138
## +(rfe) fit Fold3.Rep3 size: 135
## -(rfe) fit Fold3.Rep3 size: 135
## +(rfe) fit Fold3.Rep3 size: 133
## -(rfe) fit Fold3.Rep3 size: 133
## +(rfe) fit Fold3.Rep3 size: 132
## -(rfe) fit Fold3.Rep3 size: 132
## +(rfe) fit Fold3.Rep3 size: 131
## -(rfe) fit Fold3.Rep3 size: 131
## +(rfe) fit Fold3.Rep3 size: 130
## -(rfe) fit Fold3.Rep3 size: 130
## +(rfe) fit Fold3.Rep3 size: 129
## -(rfe) fit Fold3.Rep3 size: 129
## +(rfe) fit Fold3.Rep3 size: 128
## -(rfe) fit Fold3.Rep3 size: 128
## +(rfe) fit Fold3.Rep3 size: 124
## -(rfe) fit Fold3.Rep3 size: 124
## +(rfe) fit Fold3.Rep3 size: 120
## -(rfe) fit Fold3.Rep3 size: 120
## +(rfe) fit Fold3.Rep3 size: 112
## -(rfe) fit Fold3.Rep3 size: 112
## +(rfe) fit Fold3.Rep3 size: 96
## -(rfe) fit Fold3.Rep3 size: 96
##
## Recursive feature selection
##
## Outer resampling method: Cross-Validated (3 fold, repeated 3 times)
##
## Resampling performance over subset size:
##
## Variables Accuracy Kappa AccuracySD KappaSD Selected
## 96 0.6250 0.2430 0.008527 0.01692
## 112 0.6264 0.2465 0.010776 0.02197
## 120 0.6235 0.2410 0.009279 0.01896
## 124 0.6242 0.2425 0.010078 0.02079
## 128 0.6270 0.2483 0.007245 0.01468
## 129 0.6277 0.2496 0.008332 0.01698
## 130 0.6270 0.2482 0.009235 0.01861
## 131 0.6285 0.2512 0.008566 0.01722 *
## 132 0.6264 0.2470 0.008336 0.01699
## 133 0.6273 0.2489 0.005712 0.01207
## 135 0.6272 0.2486 0.007085 0.01457
## 138 0.6270 0.2484 0.006874 0.01444
## 142 0.6253 0.2449 0.007588 0.01580
## 157 0.6259 0.2472 0.007591 0.01568
## 187 0.6263 0.2486 0.006078 0.01237
## 247 0.6230 0.2438 0.011576 0.02309
##
## The top 5 variables (out of 131):
## Q109244.fctrNo, Q115611.fctrYes, Q113181.fctrYes, Gender.fctrM, Q98197.fctrYes
##
## [1] "Q109244.fctrNo" "Q115611.fctrYes"
## [3] "Q113181.fctrYes" "Gender.fctrM"
## [5] "Q98197.fctrYes" "Q101163.fctrDad"
## [7] "Q120379.fctrNo" "Hhold.fctrMKy"
## [9] "Q105840.fctrNo" "Q109244.fctrNo:.clusterid.fctr3"
## [11] "Q120472.fctrScience" "Q106272.fctrYes"
## [13] "Q115899.fctrMe" "Q119851.fctrNo"
## [15] "Q99480.fctrYes" "Q106042.fctrNo"
## [17] "Q98869.fctrYes" "Q101596.fctrYes"
## [19] "Q110740.fctrPC" "Q102089.fctrOwn"
## [21] "Q120014.fctrYes" "Q120650.fctrYes"
## [23] "Q108855.fctrYes!" "Edn.fctr^7"
## [25] "Q118892.fctrNo" "Q116881.fctrRight"
## [27] "Q100680.fctrNo" "Q108342.fctrIn-person"
## [29] "Q107869.fctrYes" "Q112478.fctrNo"
## [31] "Q115195.fctrNo" "Q121699.fctrNo"
## [33] "Q106388.fctrYes" "Q106389.fctrNo"
## [35] "Q120012.fctrNo" "Edn.fctr^6"
## [37] "Q116448.fctrNo" "Q119650.fctrGiving"
## [39] "Q96024.fctrYes" "Q118237.fctrNo"
## [41] "Income.fctr.Q" "Q123621.fctrYes"
## [43] "Q108617.fctrNo" "Q113583.fctrTalk"
## [45] "Q121699.fctrYes" "Q118232.fctrPr"
## [47] "Q120194.fctrTry first" "Q122770.fctrYes"
## [49] "Q121700.fctrNo" "Q124122.fctrNo"
## [51] "Q114152.fctrYes" "Q122771.fctrPt"
## [53] "Q106997.fctrGr" "Q98078.fctrNo"
## [55] "Q112270.fctrYes" "Q116953.fctrNo"
## [57] "Q111848.fctrNo" "Q100689.fctrNo"
## [59] "Income.fctr^4" "Q118233.fctrNo"
## [61] "Q99982.fctrNope" "Q106993.fctrYes"
## [63] "Q115390.fctrNo" "Q102906.fctrNo"
## [65] "Q123464.fctrNo" "Q116797.fctrNo"
## [67] "Q104996.fctrNo" "Q109367.fctrNo"
## [69] "Q111220.fctrNo" "Q99716.fctrNo"
## [71] "Q117186.fctrHot headed" "Q102674.fctrNo"
## [73] "Q118117.fctrYes" "Q122769.fctrYes"
## [75] "Edn.fctr.C" "Q108754.fctrNo"
## [77] "Q121011.fctrNo" "Q116441.fctrYes"
## [79] "YOB.Age.fctr^7" "Q105655.fctrYes"
## [81] "Q108856.fctrSocialize" "YOB.Age.fctr^8"
## [83] "Q120978.fctrNo" "Q101162.fctrPessimist"
## [85] "Q122769.fctrNo" "Q119334.fctrNo"
## [87] "Q102289.fctrYes" "Q111580.fctrSupportive"
## [89] "Q112512.fctrYes" "Q99581.fctrNo"
## [91] "Q122120.fctrNo" "Income.fctr.L"
## [93] "Q116197.fctrP.M." "Q114386.fctrMysterious"
## [95] "Q117193.fctrStandard hours" "Q114961.fctrNo"
## [97] "Q115777.fctrStart" "YOB.Age.fctr(30,35]:YOB.Age.dff"
## [99] "Q100010.fctrYes" "Q122120.fctrYes"
## [101] "Q113584.fctrTechnology" "Q119334.fctrYes"
## [103] "Q98578.fctrYes" "Q102687.fctrNo"
## [105] "Q100562.fctrNo" "Q116601.fctrNo"
## [107] "Q116197.fctrA.M." "Q103293.fctrYes"
## [109] "Q108950.fctrCautious" "Q98578.fctrNo"
## [111] "Q103293.fctrNo" "Q115602.fctrYes"
## [113] "YOB.Age.fctr(40,50]:YOB.Age.dff" "Q107491.fctrNo"
## [115] "Q114748.fctrYes" "Q115777.fctrEnd"
## [117] "Q114517.fctrYes" "Edn.fctr^5"
## [119] "Q108856.fctrSpace" "YOB.Age.fctr^5"
## [121] "Q115610.fctrYes" "Income.fctr.C"
## [123] "Q109244.fctrNo:.clusterid.fctr2" "Q124742.fctrYes"
## [125] "Q108343.fctrNo" "Income.fctr^5"
## [127] "Q105655.fctrNo" "Q111580.fctrDemanding"
## [129] "Q115610.fctrNo" "Q108343.fctrYes"
## [131] "Q113992.fctrNo"
## label step_major step_minor label_minor bgn end
## 1 fit.models_1_bgn 1 0 setup 86.224 148.782
## 2 fit.models_1_All.X 1 1 setup 148.783 NA
## elapsed
## 1 62.559
## 2 NA
## label step_major step_minor label_minor bgn end
## 2 fit.models_1_All.X 1 1 setup 148.783 148.788
## 3 fit.models_1_All.X 1 2 glmnet 148.788 NA
## elapsed
## 2 0.005
## 3 NA
## [1] "skipping fitting model: All.X##rcv#glmnet"
## label step_major step_minor label_minor bgn end
## 3 fit.models_1_All.X 1 2 glmnet 148.788 148.792
## 4 fit.models_1_All.X 1 3 glm 148.793 NA
## elapsed
## 3 0.004
## 4 NA
## [1] "skipping fitting model: All.X##rcv#glm"
## label step_major step_minor label_minor bgn end
## 4 fit.models_1_All.X 1 3 glm 148.793 148.796
## 5 fit.models_1_All.X.Inc 1 4 setup 148.797 NA
## elapsed
## 4 0.003
## 5 NA
## Loading required package: glmnet
## Loading required package: Matrix
## Loaded glmnet 2.0-5
## label step_major step_minor label_minor bgn end
## 5 fit.models_1_All.X.Inc 1 4 setup 148.797 148.98
## 6 fit.models_1_All.X.Inc 1 5 glmnet 148.981 NA
## elapsed
## 5 0.183
## 6 NA
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: All.X.Inc#nzv.spatialSign#rcv#glmnet"
## [1] " indepVar: Q122771.fctr,Q99480.fctr,Q116881.fctr,Q96024.fctr,Q110740.fctr,Q120472.fctr,Income.fctr,Q120650.fctr,Q101596.fctr,Q116953.fctr,Q115195.fctr,Q106997.fctr,Q118232.fctr,Q106042.fctr,Q121699.fctr,Q106389.fctr,Q108855.fctr,Q124742.fctr,Q122770.fctr,Q112478.fctr,Q113583.fctr,Q116601.fctr,Q105840.fctr,Q118233.fctr,Q111848.fctr,Q106388.fctr,Q108342.fctr,Q120194.fctr,Q98078.fctr,Q106272.fctr,Q102089.fctr,Q118892.fctr,Q117186.fctr,Q122120.fctr,Q104996.fctr,Q115390.fctr,YOB.Age.fctr,Q109367.fctr,Q112270.fctr,Q98059.fctr,Q124122.fctr,Edn.fctr,Q101162.fctr,Q120014.fctr,Q116797.fctr,Q117193.fctr,Q114517.fctr,Q106993.fctr,Q115610.fctr,Q123621.fctr,Q120012.fctr,Q105655.fctr,Q119650.fctr,Q108950.fctr,.rnorm,Q100010.fctr,Q100562.fctr,Q100680.fctr,Q102289.fctr,Q102674.fctr,Q102687.fctr,Q102906.fctr,Q103293.fctr,Q107491.fctr,Q107869.fctr,Q108343.fctr,Q108617.fctr,Q108754.fctr,Q108856.fctr,Q111220.fctr,Q111580.fctr,Q112512.fctr,Q113584.fctr,Q113992.fctr,Q114152.fctr,Q114386.fctr,Q114748.fctr,Q114961.fctr,Q115602.fctr,Q115777.fctr,Q116197.fctr,Q116441.fctr,Q116448.fctr,Q118117.fctr,Q118237.fctr,Q119334.fctr,Q120978.fctr,Q121011.fctr,Q121700.fctr,Q122769.fctr,Q123464.fctr,Q98578.fctr,Q99581.fctr,Q99716.fctr,Q99982.fctr,Q109244.fctr*Q98197.fctr,Q109244.fctr*Q115611.fctr,Q109244.fctr*Q113181.fctr,Q109244.fctr*Q101163.fctr,Q109244.fctr*Q119851.fctr,Q109244.fctr*Q120379.fctr,Q109244.fctr*Q98869.fctr,Q109244.fctr*Q100689.fctr,Q109244.fctr*Q115899.fctr,Q109244.fctr*Gender.fctr,Q109244.fctr*Hhold.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.775000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.1, lambda = 0.0627 on full training set
## [1] "myfit_mdl: train complete: 68.065000 secs"
## Warning in myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst
## = list(id.prefix = mdl_id_pfx, : model's bestTune found at an extreme of
## tuneGrid for parameter: alpha
## Warning in myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst
## = list(id.prefix = mdl_id_pfx, : model's bestTune found at an extreme of
## tuneGrid for parameter: lambda
## Length Class Mode
## a0 86 -none- numeric
## beta 23478 dgCMatrix S4
## df 86 -none- numeric
## dim 2 -none- numeric
## lambda 86 -none- numeric
## dev.ratio 86 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 273 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Edn.fctr.L
## -1.870080e-01 -3.544246e-02
## Edn.fctr.C Edn.fctr^7
## 6.914546e-02 -1.536665e-01
## Income.fctr.Q Income.fctr.C
## 5.292594e-01 4.506927e-01
## Income.fctr^4 Q101162.fctrPessimist
## 3.142027e-02 7.926422e-02
## Q101596.fctrYes Q102089.fctrRent
## 4.827385e-01 -2.403896e-01
## Q104996.fctrNo Q104996.fctrYes
## 2.581903e-01 -3.310237e-02
## Q105655.fctrYes Q105840.fctrNo
## 4.356968e-02 2.894077e-01
## Q106042.fctrNo Q106272.fctrYes
## 3.236708e-01 2.534570e-01
## Q106388.fctrYes Q106389.fctrNo
## 3.122273e-01 3.469210e-01
## Q106993.fctrNo Q106997.fctrGr
## 6.525039e-02 5.073205e-01
## Q106997.fctrYy Q108342.fctrOnline
## -2.312455e-01 -2.173915e-01
## Q108855.fctrYes! Q109244.fctrNo
## 3.965299e-01 1.279360e+00
## Q109244.fctrYes Gender.fctrF
## -2.560175e+00 -4.592804e-01
## Gender.fctrM Hhold.fctrMKy
## 7.090201e-01 4.952216e-01
## Q100689.fctrYes Q101163.fctrDad
## -5.655680e-01 6.626309e-01
## Q101163.fctrMom Q113181.fctrNo
## -1.842801e-01 -6.446393e-01
## Q113181.fctrYes Q115611.fctrNo
## 9.481566e-01 -9.389359e-01
## Q115611.fctrYes Q115899.fctrCs
## 1.280268e+00 -4.497319e-01
## Q115899.fctrMe Q119851.fctrNo
## 9.318596e-02 8.223881e-01
## Q119851.fctrYes Q120379.fctrNo
## -3.952051e-01 2.748152e-01
## Q120379.fctrYes Q98197.fctrNo
## -5.909843e-01 -1.608971e+00
## Q98197.fctrYes Q98869.fctrNo
## 5.057868e-01 -6.870039e-01
## Q109367.fctrYes Q110740.fctrMac
## -7.961186e-02 -1.743112e-01
## Q110740.fctrPC Q111848.fctrYes
## 6.076380e-01 -2.055190e-01
## Q112270.fctrNo Q112478.fctrNo
## -1.423988e-01 2.996900e-01
## Q112478.fctrYes Q113583.fctrTunes
## -6.875376e-02 -3.126712e-01
## Q114517.fctrNo Q115195.fctrNo
## -3.258047e-02 1.202226e-01
## Q115195.fctrYes Q115390.fctrNo
## -4.755215e-01 3.780203e-02
## Q115390.fctrYes Q115610.fctrNo
## -2.115296e-01 2.786308e-02
## Q116601.fctrYes Q116797.fctrNo
## -3.374291e-01 5.539929e-02
## Q116881.fctrHappy Q116881.fctrRight
## -3.028985e-01 6.451948e-01
## Q116953.fctrNo Q116953.fctrYes
## 4.667650e-01 -4.528909e-02
## Q117186.fctrHot headed Q117193.fctrStandard hours
## 2.196134e-01 5.774899e-02
## Q118232.fctrId Q118233.fctrNo
## -3.536773e-01 2.431745e-01
## Q118892.fctrYes Q120014.fctrYes
## -1.759408e-01 5.025107e-02
## Q120194.fctrStudy first Q120472.fctrScience
## -1.698270e-01 5.472246e-01
## Q120650.fctrNo Q120650.fctrYes
## -2.389300e-01 4.918962e-01
## Q121699.fctrYes Q122120.fctrYes
## -3.414898e-01 2.231463e-01
## Q122770.fctrYes Q122771.fctrPt
## 3.154304e-01 6.403583e-01
## Q123621.fctrYes Q124122.fctrNo
## 2.721131e-02 9.963849e-03
## Q124122.fctrYes Q124742.fctrNo
## -8.358882e-02 -3.648730e-01
## Q96024.fctrNo Q98059.fctrOnly-child
## -5.396160e-01 1.063695e-01
## Q98059.fctrYes Q98078.fctrYes
## -1.610647e-01 -1.972681e-01
## Q99480.fctrNo Q99480.fctrYes
## -5.364302e-01 2.567549e-01
## YOB.Age.fctr.L YOB.Age.fctr^8
## -9.216454e-02 1.481282e-02
## Q109244.fctrNo:Gender.fctrF Q109244.fctrYes:Gender.fctrF
## 6.760909e-01 -1.406250e+00
## Q109244.fctrYes:Gender.fctrM Q109244.fctrNo:Hhold.fctrMKy
## -1.046754e+00 4.182259e-01
## Q109244.fctrNo:Hhold.fctrSKn Q109244.fctrNo:Q100689.fctrNo
## 2.511662e-01 1.061781e-01
## Q109244.fctrYes:Q100689.fctrYes Q109244.fctrNo:Q101163.fctrDad
## -7.502077e-01 8.430391e-01
## Q109244.fctrYes:Q101163.fctrDad Q109244.fctrYes:Q113181.fctrNo
## -4.975712e-01 -2.117324e-01
## Q109244.fctrNo:Q113181.fctrYes Q109244.fctrYes:Q115611.fctrNo
## 7.414332e-01 -8.629370e-01
## Q109244.fctrNo:Q115611.fctrYes Q109244.fctrYes:Q115899.fctrCs
## 6.229949e-01 -6.141602e-01
## Q109244.fctrNo:Q115899.fctrMe Q109244.fctrYes:Q115899.fctrMe
## 6.986536e-01 -1.905787e-01
## Q109244.fctrYes:Q119851.fctrNo Q109244.fctrNo:Q119851.fctrYes
## -5.250326e-01 2.069516e-01
## Q109244.fctrYes:Q119851.fctrYes Q109244.fctrNo:Q120379.fctrNo
## -8.947315e-01 9.777988e-05
## Q109244.fctrYes:Q120379.fctrNo Q109244.fctrYes:Q120379.fctrYes
## -1.357518e-01 -1.295258e+00
## Q109244.fctrYes:Q98197.fctrNo Q109244.fctrNo:Q98197.fctrYes
## -8.103881e-01 5.024641e-01
## Q109244.fctrNo:Q98869.fctrYes Q109244.fctrYes:Q98869.fctrYes
## 2.065324e-01 -9.994494e-01
## Q109244.fctrNo:.clusterid.fctr3
## 4.999300e-02
## [1] "max lambda < lambdaOpt:"
## (Intercept) Edn.fctr.L
## -0.189072105 -0.046820778
## Edn.fctr.C Edn.fctr^7
## 0.092341132 -0.181786886
## Income.fctr.Q Income.fctr.C
## 0.570756979 0.509917566
## Income.fctr^4 Q101162.fctrPessimist
## 0.071069731 0.111732855
## Q101596.fctrYes Q102089.fctrRent
## 0.529982920 -0.261186399
## Q104996.fctrNo Q104996.fctrYes
## 0.286954880 -0.071969765
## Q105655.fctrYes Q105840.fctrNo
## 0.087150395 0.300405928
## Q105840.fctrYes Q106042.fctrNo
## -0.011342484 0.348179343
## Q106272.fctrYes Q106388.fctrYes
## 0.281417421 0.334445084
## Q106389.fctrNo Q106993.fctrNo
## 0.395247516 0.127368175
## Q106997.fctrGr Q106997.fctrYy
## 0.524571985 -0.279740442
## Q108342.fctrOnline Q108855.fctrYes!
## -0.265082561 0.449845763
## Q109244.fctrNo Q109244.fctrYes
## 1.293063530 -2.594827272
## Gender.fctrF Gender.fctrM
## -0.465645554 0.739190232
## Hhold.fctrMKy Q100689.fctrYes
## 0.534400773 -0.645791139
## Q101163.fctrDad Q101163.fctrMom
## 0.716395145 -0.185817002
## Q113181.fctrNo Q113181.fctrYes
## -0.664420320 0.995196016
## Q115611.fctrNo Q115611.fctrYes
## -0.956029987 1.327228814
## Q115899.fctrCs Q115899.fctrMe
## -0.486981304 0.127543359
## Q119851.fctrNo Q119851.fctrYes
## 0.875597695 -0.442573526
## Q120379.fctrNo Q120379.fctrYes
## 0.276543946 -0.649401019
## Q98197.fctrNo Q98197.fctrYes
## -1.677470421 0.536987418
## Q98869.fctrNo Q109367.fctrYes
## -0.735543778 -0.114118278
## Q110740.fctrMac Q110740.fctrPC
## -0.191976338 0.649732005
## Q111848.fctrYes Q112270.fctrNo
## -0.254464074 -0.185879261
## Q112478.fctrNo Q112478.fctrYes
## 0.337266561 -0.081753416
## Q113583.fctrTunes Q114517.fctrNo
## -0.359371313 -0.076813126
## Q115195.fctrNo Q115195.fctrYes
## 0.141025662 -0.508176919
## Q115390.fctrNo Q115390.fctrYes
## 0.075820235 -0.236020830
## Q115610.fctrNo Q116601.fctrYes
## 0.068794425 -0.394952624
## Q116797.fctrNo Q116881.fctrHappy
## 0.104489938 -0.343558069
## Q116881.fctrRight Q116953.fctrNo
## 0.666765837 0.499291594
## Q116953.fctrYes Q117186.fctrHot headed
## -0.087186092 0.258307118
## Q117193.fctrStandard hours Q118232.fctrId
## 0.102229850 -0.400213188
## Q118233.fctrNo Q118892.fctrYes
## 0.303129756 -0.211934840
## Q119650.fctrGiving Q119650.fctrReceiving
## 0.003175253 -0.036425184
## Q120014.fctrYes Q120194.fctrStudy first
## 0.082795133 -0.214152335
## Q120472.fctrScience Q120650.fctrNo
## 0.587262158 -0.266569656
## Q120650.fctrYes Q121699.fctrYes
## 0.540214512 -0.399346330
## Q122120.fctrYes Q122770.fctrYes
## 0.261721758 0.356882554
## Q122771.fctrPt Q123621.fctrYes
## 0.681708988 0.072715167
## Q124122.fctrNo Q124122.fctrYes
## 0.033517989 -0.121636634
## Q124742.fctrNo Q96024.fctrNo
## -0.423985058 -0.590864680
## Q98059.fctrOnly-child Q98059.fctrYes
## 0.160447364 -0.199301138
## Q98078.fctrYes Q99480.fctrNo
## -0.211690962 -0.556805997
## Q99480.fctrYes YOB.Age.fctr.L
## 0.323262965 -0.138746738
## YOB.Age.fctr.Q YOB.Age.fctr^8
## -0.015111949 0.055134318
## Q109244.fctrNo:Gender.fctrF Q109244.fctrYes:Gender.fctrF
## 0.763587743 -1.428321821
## Q109244.fctrYes:Gender.fctrM Q109244.fctrNo:Hhold.fctrMKy
## -1.089360672 0.418670837
## Q109244.fctrNo:Hhold.fctrSKn Q109244.fctrNo:Q100689.fctrNo
## 0.282289894 0.080209802
## Q109244.fctrYes:Q100689.fctrYes Q109244.fctrNo:Q101163.fctrDad
## -0.725136233 0.824994188
## Q109244.fctrYes:Q101163.fctrDad Q109244.fctrYes:Q113181.fctrNo
## -0.526128015 -0.161500051
## Q109244.fctrNo:Q113181.fctrYes Q109244.fctrYes:Q115611.fctrNo
## 0.708874537 -0.829694220
## Q109244.fctrNo:Q115611.fctrYes Q109244.fctrYes:Q115899.fctrCs
## 0.603058295 -0.607569007
## Q109244.fctrNo:Q115899.fctrMe Q109244.fctrYes:Q115899.fctrMe
## 0.688838780 -0.199289765
## Q109244.fctrYes:Q119851.fctrNo Q109244.fctrNo:Q119851.fctrYes
## -0.550531893 0.276379878
## Q109244.fctrYes:Q119851.fctrYes Q109244.fctrYes:Q120379.fctrNo
## -0.900843172 -0.141221407
## Q109244.fctrYes:Q120379.fctrYes Q109244.fctrYes:Q98197.fctrNo
## -1.327652471 -0.795129017
## Q109244.fctrNo:Q98197.fctrYes Q109244.fctrNo:Q98869.fctrYes
## 0.462051069 0.197207116
## Q109244.fctrYes:Q98869.fctrYes Q109244.fctrNo:.clusterid.fctr3
## -1.024516320 0.069468043
## [1] "myfit_mdl: train diagnostics complete: 68.854000 secs"
## Loading required package: ROCR
## Loading required package: gplots
##
## Attaching package: 'gplots'
## The following object is masked from 'package:stats':
##
## lowess
## Loading required package: sqldf
## Loading required package: gsubfn
## Loading required package: proto
## Loading required package: RSQLite
## Loading required package: DBI
## Loading required package: tcltk
## Prediction
## Reference D R
## D 1660 700
## R 750 1343
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.743768e-01 3.455194e-01 6.603900e-01 6.881346e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 2.159063e-85 1.981629e-01
## Prediction
## Reference D R
## D 505 86
## R 381 143
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.811659e-01 1.315837e-01 5.515760e-01 6.103264e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 3.378502e-04 3.755188e-42
## [1] "myfit_mdl: predict complete: 89.737000 secs"
## id
## 1 All.X.Inc#nzv.spatialSign#rcv#glmnet
## feats
## 1 Q122771.fctr,Q99480.fctr,Q116881.fctr,Q96024.fctr,Q110740.fctr,Q120472.fctr,Income.fctr,Q120650.fctr,Q101596.fctr,Q116953.fctr,Q115195.fctr,Q106997.fctr,Q118232.fctr,Q106042.fctr,Q121699.fctr,Q106389.fctr,Q108855.fctr,Q124742.fctr,Q122770.fctr,Q112478.fctr,Q113583.fctr,Q116601.fctr,Q105840.fctr,Q118233.fctr,Q111848.fctr,Q106388.fctr,Q108342.fctr,Q120194.fctr,Q98078.fctr,Q106272.fctr,Q102089.fctr,Q118892.fctr,Q117186.fctr,Q122120.fctr,Q104996.fctr,Q115390.fctr,YOB.Age.fctr,Q109367.fctr,Q112270.fctr,Q98059.fctr,Q124122.fctr,Edn.fctr,Q101162.fctr,Q120014.fctr,Q116797.fctr,Q117193.fctr,Q114517.fctr,Q106993.fctr,Q115610.fctr,Q123621.fctr,Q120012.fctr,Q105655.fctr,Q119650.fctr,Q108950.fctr,.rnorm,Q100010.fctr,Q100562.fctr,Q100680.fctr,Q102289.fctr,Q102674.fctr,Q102687.fctr,Q102906.fctr,Q103293.fctr,Q107491.fctr,Q107869.fctr,Q108343.fctr,Q108617.fctr,Q108754.fctr,Q108856.fctr,Q111220.fctr,Q111580.fctr,Q112512.fctr,Q113584.fctr,Q113992.fctr,Q114152.fctr,Q114386.fctr,Q114748.fctr,Q114961.fctr,Q115602.fctr,Q115777.fctr,Q116197.fctr,Q116441.fctr,Q116448.fctr,Q118117.fctr,Q118237.fctr,Q119334.fctr,Q120978.fctr,Q121011.fctr,Q121700.fctr,Q122769.fctr,Q123464.fctr,Q98578.fctr,Q99581.fctr,Q99716.fctr,Q99982.fctr,Q109244.fctr*Q98197.fctr,Q109244.fctr*Q115611.fctr,Q109244.fctr*Q113181.fctr,Q109244.fctr*Q101163.fctr,Q109244.fctr*Q119851.fctr,Q109244.fctr*Q120379.fctr,Q109244.fctr*Q98869.fctr,Q109244.fctr*Q100689.fctr,Q109244.fctr*Q115899.fctr,Q109244.fctr*Gender.fctr,Q109244.fctr*Hhold.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 67.172 6.265
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6725263 0.7033898 0.6416627 0.7424782
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6494197 0.6440612
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.66039 0.6881346 0.2850069
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.5556503 0.5922166 0.519084 0.5734523
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.6 0.3798141 0.5811659
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.551576 0.6103264 0.1315837
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.007013697 0.01515544
## [1] "myfit_mdl: exit: 89.752000 secs"
## label step_major step_minor label_minor bgn end
## 6 fit.models_1_All.X.Inc 1 5 glmnet 148.981 238.737
## 7 fit.models_1_RFE.X 1 6 setup 238.738 NA
## elapsed
## 6 89.756
## 7 NA
## label step_major step_minor label_minor bgn end
## 7 fit.models_1_RFE.X 1 6 setup 238.738 238.745
## 8 fit.models_1_RFE.X 1 7 glmnet 238.746 NA
## elapsed
## 7 0.007
## 8 NA
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X##rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.703000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## [1] "myfit_mdl: train complete: 22.783000 secs"
## Length Class Mode
## a0 83 -none- numeric
## beta 20252 dgCMatrix S4
## df 83 -none- numeric
## dim 2 -none- numeric
## lambda 83 -none- numeric
## dev.ratio 83 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.231235208 0.105996862
## Hhold.fctrMKy Hhold.fctrPKn
## 0.037530839 -0.462338411
## Income.fctr.Q Income.fctr.C
## 0.050511902 0.018998965
## Q100689.fctrYes Q101163.fctrDad
## -0.055283639 0.146113017
## Q101596.fctrYes Q102089.fctrRent
## 0.036618639 -0.015340306
## Q106042.fctrNo Q106272.fctrYes
## 0.011463411 0.009424122
## Q106388.fctrYes Q106997.fctrGr
## 0.026714803 0.075133557
## Q108855.fctrYes! Q109244.fctrNo
## 0.029034122 0.424732820
## Q109244.fctrYes Q110740.fctrPC
## -1.290091615 0.083252496
## Q112478.fctrNo Q113181.fctrNo
## 0.010843412 -0.088149365
## Q113181.fctrYes Q115195.fctrYes
## 0.187631356 -0.026839083
## Q115611.fctrNo Q115611.fctrYes
## -0.142804586 0.238183824
## Q115899.fctrCs Q116881.fctrHappy
## -0.090071561 -0.008298821
## Q116881.fctrRight Q116953.fctrNo
## 0.093162156 0.028952204
## Q118232.fctrId Q119851.fctrNo
## -0.016361288 0.100215288
## Q120379.fctrYes Q120472.fctrScience
## -0.104208571 0.057685089
## Q120650.fctrYes Q122771.fctrPt
## 0.046857175 0.073870604
## Q96024.fctrNo Q98197.fctrNo
## -0.015142098 -0.317900131
## Q98197.fctrYes Q98869.fctrNo
## 0.019623012 -0.054425151
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.060237559 -0.340923455
## YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.013105017
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.2330609616 0.1054981329
## Hhold.fctrMKy Hhold.fctrPKn
## 0.0441815228 -0.4832355082
## Income.fctr.Q Income.fctr.C
## 0.0602852373 0.0347677155
## Q100689.fctrYes Q101163.fctrDad
## -0.0683272189 0.1533257769
## Q101596.fctrYes Q102089.fctrRent
## 0.0439390076 -0.0239022190
## Q104996.fctrNo Q106042.fctrNo
## 0.0043630800 0.0181892131
## Q106272.fctrYes Q106388.fctrYes
## 0.0133561866 0.0322154731
## Q106389.fctrNo Q106997.fctrGr
## 0.0034398840 0.0883487716
## Q108342.fctrOnline Q108855.fctrYes!
## -0.0024951688 0.0384230419
## Q109244.fctrNo Q109244.fctrYes
## 0.4252674971 -1.2944252294
## Q110740.fctrPC Q112478.fctrNo
## 0.0904838371 0.0206308499
## Q113181.fctrNo Q113181.fctrYes
## -0.0974065367 0.1868282743
## Q113583.fctrTunes Q115195.fctrYes
## -0.0004141873 -0.0375439703
## Q115611.fctrNo Q115611.fctrYes
## -0.1393412913 0.2431770094
## Q115899.fctrCs Q116881.fctrHappy
## -0.1011804925 -0.0184386866
## Q116881.fctrRight Q116953.fctrNo
## 0.0961084981 0.0426058122
## Q118232.fctrId Q119851.fctrNo
## -0.0266978568 0.1074911511
## Q119851.fctrYes Q120379.fctrYes
## -0.0033132601 -0.1185959917
## Q120472.fctrScience Q120650.fctrYes
## 0.0652028941 0.0591120125
## Q121699.fctrYes Q122120.fctrYes
## -0.0080339783 0.0008435008
## Q122771.fctrPt Q124742.fctrNo
## 0.0876713081 -0.0112811758
## Q96024.fctrNo Q98197.fctrNo
## -0.0246782767 -0.3250116396
## Q98197.fctrYes Q98869.fctrNo
## 0.0194484440 -0.0664120602
## Q99480.fctrNo Q99480.fctrYes
## -0.0685669208 0.0052925176
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.3783124405 -0.0181184935
## [1] "myfit_mdl: train diagnostics complete: 23.442000 secs"
## Prediction
## Reference D R
## D 1671 689
## R 807 1286
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.640467e-01 3.235116e-01 6.499576e-01 6.779203e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.083627e-73 2.486636e-03
## Prediction
## Reference D R
## D 440 151
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.766816e-01 1.343766e-01 5.470616e-01 6.058959e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 9.762675e-04 7.318358e-15
## [1] "myfit_mdl: predict complete: 38.333000 secs"
## id
## 1 RFE.X##rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 21.949 2.003
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6612399 0.7080508 0.614429 0.7306715
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6322517 0.6475052
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6499576 0.6779203 0.2914606
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.558818 0.6023689 0.5152672 0.5757966
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4624146 0.5766816
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5470616 0.6058959 0.1343766
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.008383749 0.01784651
## [1] "myfit_mdl: exit: 38.347000 secs"
## label step_major step_minor label_minor bgn end
## 8 fit.models_1_RFE.X 1 7 glmnet 238.746 277.139
## 9 fit.models_1_preProc 1 8 preProc 277.140 NA
## elapsed
## 8 38.393
## 9 NA
## Loading required package: gdata
## gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
##
## gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.
##
## Attaching package: 'gdata'
## The following objects are masked from 'package:dplyr':
##
## combine, first, last
## The following object is masked from 'package:stats':
##
## nobs
## The following object is masked from 'package:utils':
##
## object.size
## [1] "skipping fitting model: All.X#zv#rcv#glmnet"
## [1] "skipping fitting model: All.X#nzv#rcv#glmnet"
## [1] "skipping fitting model: All.X#BoxCox#rcv#glmnet"
## [1] "skipping fitting model: All.X#YeoJohnson#rcv#glmnet"
## [1] "skipping fitting model: All.X#expoTrans#rcv#glmnet"
## [1] "skipping fitting model: All.X#center#rcv#glmnet"
## [1] "skipping fitting model: All.X#scale#rcv#glmnet"
## [1] "skipping fitting model: All.X#center.scale#rcv#glmnet"
## [1] "skipping fitting model: All.X#range#rcv#glmnet"
## [1] "skipping fitting model: All.X#zv.pca#rcv#glmnet"
## [1] "skipping fitting model: All.X#ica#rcv#glmnet"
## [1] "skipping fitting model: All.X#spatialSign#rcv#glmnet"
## [1] "skipping fitting model: All.X#conditionalX#rcv#glmnet"
## [1] "skipping fitting model: All.X#nzv.spatialSign#rcv#glmnet"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#zv#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.687000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## [1] "myfit_mdl: train complete: 25.069000 secs"
## Length Class Mode
## a0 83 -none- numeric
## beta 20169 dgCMatrix S4
## df 83 -none- numeric
## dim 2 -none- numeric
## lambda 83 -none- numeric
## dev.ratio 83 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 243 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.231235208 0.105996862
## Hhold.fctrMKy Hhold.fctrPKn
## 0.037530839 -0.462338411
## Income.fctr.Q Income.fctr.C
## 0.050511902 0.018998965
## Q100689.fctrYes Q101163.fctrDad
## -0.055283639 0.146113017
## Q101596.fctrYes Q102089.fctrRent
## 0.036618639 -0.015340306
## Q106042.fctrNo Q106272.fctrYes
## 0.011463411 0.009424122
## Q106388.fctrYes Q106997.fctrGr
## 0.026714803 0.075133557
## Q108855.fctrYes! Q109244.fctrNo
## 0.029034122 0.424732820
## Q109244.fctrYes Q110740.fctrPC
## -1.290091615 0.083252496
## Q112478.fctrNo Q113181.fctrNo
## 0.010843412 -0.088149365
## Q113181.fctrYes Q115195.fctrYes
## 0.187631356 -0.026839083
## Q115611.fctrNo Q115611.fctrYes
## -0.142804586 0.238183824
## Q115899.fctrCs Q116881.fctrHappy
## -0.090071561 -0.008298821
## Q116881.fctrRight Q116953.fctrNo
## 0.093162156 0.028952204
## Q118232.fctrId Q119851.fctrNo
## -0.016361288 0.100215288
## Q120379.fctrYes Q120472.fctrScience
## -0.104208571 0.057685089
## Q120650.fctrYes Q122771.fctrPt
## 0.046857175 0.073870604
## Q96024.fctrNo Q98197.fctrNo
## -0.015142098 -0.317900131
## Q98197.fctrYes Q98869.fctrNo
## 0.019623012 -0.054425151
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.060237559 -0.340923455
## YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.013105017
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.2330609616 0.1054981329
## Hhold.fctrMKy Hhold.fctrPKn
## 0.0441815228 -0.4832355082
## Income.fctr.Q Income.fctr.C
## 0.0602852373 0.0347677155
## Q100689.fctrYes Q101163.fctrDad
## -0.0683272189 0.1533257769
## Q101596.fctrYes Q102089.fctrRent
## 0.0439390076 -0.0239022190
## Q104996.fctrNo Q106042.fctrNo
## 0.0043630800 0.0181892131
## Q106272.fctrYes Q106388.fctrYes
## 0.0133561866 0.0322154731
## Q106389.fctrNo Q106997.fctrGr
## 0.0034398840 0.0883487716
## Q108342.fctrOnline Q108855.fctrYes!
## -0.0024951688 0.0384230419
## Q109244.fctrNo Q109244.fctrYes
## 0.4252674971 -1.2944252294
## Q110740.fctrPC Q112478.fctrNo
## 0.0904838371 0.0206308499
## Q113181.fctrNo Q113181.fctrYes
## -0.0974065367 0.1868282743
## Q113583.fctrTunes Q115195.fctrYes
## -0.0004141873 -0.0375439703
## Q115611.fctrNo Q115611.fctrYes
## -0.1393412913 0.2431770094
## Q115899.fctrCs Q116881.fctrHappy
## -0.1011804925 -0.0184386866
## Q116881.fctrRight Q116953.fctrNo
## 0.0961084981 0.0426058122
## Q118232.fctrId Q119851.fctrNo
## -0.0266978568 0.1074911511
## Q119851.fctrYes Q120379.fctrYes
## -0.0033132601 -0.1185959917
## Q120472.fctrScience Q120650.fctrYes
## 0.0652028941 0.0591120125
## Q121699.fctrYes Q122120.fctrYes
## -0.0080339783 0.0008435008
## Q122771.fctrPt Q124742.fctrNo
## 0.0876713081 -0.0112811758
## Q96024.fctrNo Q98197.fctrNo
## -0.0246782767 -0.3250116396
## Q98197.fctrYes Q98869.fctrNo
## 0.0194484440 -0.0664120602
## Q99480.fctrNo Q99480.fctrYes
## -0.0685669208 0.0052925176
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.3783124405 -0.0181184935
## [1] "myfit_mdl: train diagnostics complete: 25.724000 secs"
## Prediction
## Reference D R
## D 1671 689
## R 807 1286
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.640467e-01 3.235116e-01 6.499576e-01 6.779203e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.083627e-73 2.486636e-03
## Prediction
## Reference D R
## D 440 151
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.766816e-01 1.343766e-01 5.470616e-01 6.058959e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 9.762675e-04 7.318358e-15
## [1] "myfit_mdl: predict complete: 40.169000 secs"
## id
## 1 RFE.X#zv#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 24.269 2.29
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6612399 0.7080508 0.614429 0.7306715
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6322517 0.6475052
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6499576 0.6779203 0.2914606
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.558818 0.6023689 0.5152672 0.5757966
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4624146 0.5766816
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5470616 0.6058959 0.1343766
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.008383749 0.01784651
## [1] "myfit_mdl: exit: 40.183000 secs"
## [1] "\nmyfit_mdl: enter: 0.000000 secs"
## [1] "fitting model: RFE.X#nzv#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.680000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.1, lambda = 0.0652 on full training set
## [1] "myfit_mdl: train complete: 34.904000 secs"
## Warning in myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst
## = list(id.prefix = mdlFamily, : model's bestTune found at an extreme of
## tuneGrid for parameter: alpha
## Warning in myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst
## = list(id.prefix = mdlFamily, : model's bestTune found at an extreme of
## tuneGrid for parameter: lambda
## Length Class Mode
## a0 88 -none- numeric
## beta 20328 dgCMatrix S4
## df 88 -none- numeric
## dim 2 -none- numeric
## lambda 88 -none- numeric
## dev.ratio 88 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 231 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Edn.fctr.L
## -2.154516e-01 -2.745656e-03
## Edn.fctr^7 Gender.fctrF
## -3.387254e-02 -5.182228e-02
## Gender.fctrM Hhold.fctrMKy
## 7.895144e-02 8.591367e-02
## Income.fctr.Q Income.fctr.C
## 8.239323e-02 7.017604e-02
## Q100689.fctrYes Q101162.fctrPessimist
## -8.295788e-02 1.835728e-02
## Q101163.fctrDad Q101163.fctrMom
## 1.243055e-01 -2.922230e-02
## Q101596.fctrYes Q102089.fctrRent
## 5.407240e-02 -3.528163e-02
## Q104996.fctrNo Q104996.fctrYes
## 1.909810e-02 -1.211956e-02
## Q105655.fctrYes Q105840.fctrNo
## 1.388637e-03 2.489280e-02
## Q105840.fctrYes Q106042.fctrNo
## -4.192820e-03 3.872037e-02
## Q106272.fctrYes Q106388.fctrYes
## 2.523027e-02 4.324359e-02
## Q106389.fctrNo Q106997.fctrGr
## 3.340097e-02 6.453946e-02
## Q106997.fctrYy Q108342.fctrOnline
## -5.057567e-02 -4.057683e-02
## Q108855.fctrYes! Q109244.fctrNo
## 4.012479e-02 4.219346e-01
## Q109244.fctrYes Q109367.fctrYes
## -9.823090e-01 -1.400745e-02
## Q110740.fctrMac Q110740.fctrPC
## -3.316841e-02 7.553836e-02
## Q111848.fctrYes Q112270.fctrNo
## -2.387019e-02 -1.881638e-02
## Q112478.fctrNo Q112478.fctrYes
## 4.035856e-02 -7.155906e-03
## Q113181.fctrNo Q113181.fctrYes
## -1.006515e-01 1.470536e-01
## Q113583.fctrTunes Q114517.fctrNo
## -2.555222e-02 -2.285899e-03
## Q115195.fctrNo Q115195.fctrYes
## 1.159416e-02 -5.330550e-02
## Q115390.fctrNo Q115390.fctrYes
## 4.672790e-03 -3.166722e-02
## Q115611.fctrNo Q115611.fctrYes
## -1.537101e-01 2.302089e-01
## Q115899.fctrCs Q115899.fctrMe
## -7.249385e-02 5.540703e-02
## Q116601.fctrYes Q116797.fctrNo
## -1.982515e-02 1.986918e-03
## Q116881.fctrHappy Q116881.fctrRight
## -4.328826e-02 9.013227e-02
## Q116953.fctrNo Q116953.fctrYes
## 6.420284e-02 -5.172911e-03
## Q117186.fctrHot headed Q117193.fctrStandard hours
## 2.151546e-02 1.738989e-04
## Q118232.fctrId Q118233.fctrNo
## -5.695596e-02 3.321522e-02
## Q118892.fctrYes Q119650.fctrGiving
## -1.848483e-02 4.128453e-06
## Q119851.fctrNo Q119851.fctrYes
## 8.837560e-02 -4.320475e-02
## Q120014.fctrYes Q120194.fctrStudy first
## 1.177677e-02 -3.089279e-02
## Q120379.fctrNo Q120379.fctrYes
## 4.608746e-02 -9.854030e-02
## Q120472.fctrScience Q120650.fctrNo
## 6.924583e-02 -3.854889e-02
## Q120650.fctrYes Q121699.fctrNo
## 5.976671e-02 2.179055e-02
## Q121699.fctrYes Q122120.fctrYes
## -3.353492e-02 3.109799e-02
## Q122770.fctrYes Q122771.fctrPt
## 2.274992e-02 9.605633e-02
## Q124122.fctrNo Q124122.fctrYes
## 6.265866e-03 -2.519687e-02
## Q124742.fctrNo Q96024.fctrNo
## -4.401239e-02 -6.556192e-02
## Q98078.fctrYes Q98197.fctrNo
## -3.611038e-02 -2.284711e-01
## Q98197.fctrYes Q98869.fctrNo
## 8.337350e-02 -1.249783e-01
## Q99480.fctrNo Q99480.fctrYes
## -9.686470e-02 2.465803e-02
## YOB.Age.fctr.L Q109244.fctrNo:.clusterid.fctr3
## -4.368958e-02 7.600437e-02
## [1] "max lambda < lambdaOpt:"
## (Intercept) Edn.fctr.L
## -2.180664e-01 -4.504906e-03
## Edn.fctr^7 Gender.fctrF
## -3.919843e-02 -4.912579e-02
## Gender.fctrM Hhold.fctrMKy
## 7.985786e-02 9.109173e-02
## Income.fctr.Q Income.fctr.C
## 8.917826e-02 8.077794e-02
## Income.fctr^6 Q100689.fctrYes
## -2.111720e-03 -9.045691e-02
## Q101162.fctrPessimist Q101163.fctrDad
## 2.289540e-02 1.297732e-01
## Q101163.fctrMom Q101596.fctrYes
## -2.811585e-02 5.857433e-02
## Q102089.fctrRent Q104996.fctrNo
## -3.768419e-02 2.279665e-02
## Q104996.fctrYes Q105655.fctrYes
## -1.716435e-02 6.520654e-03
## Q105840.fctrNo Q105840.fctrYes
## 2.444161e-02 -5.197535e-03
## Q106042.fctrNo Q106272.fctrYes
## 4.017503e-02 2.822933e-02
## Q106388.fctrYes Q106389.fctrNo
## 4.667455e-02 3.921161e-02
## Q106993.fctrNo Q106997.fctrGr
## 7.816865e-03 6.810404e-02
## Q106997.fctrYy Q108342.fctrOnline
## -5.704944e-02 -4.561936e-02
## Q108855.fctrYes! Q109244.fctrNo
## 4.602034e-02 4.281871e-01
## Q109244.fctrYes Q109367.fctrYes
## -1.005277e+00 -1.728142e-02
## Q110740.fctrMac Q110740.fctrPC
## -3.506281e-02 8.089113e-02
## Q111848.fctrYes Q112270.fctrNo
## -2.896598e-02 -2.362558e-02
## Q112478.fctrNo Q112478.fctrYes
## 4.485883e-02 -8.971864e-03
## Q113181.fctrNo Q113181.fctrYes
## -1.016505e-01 1.510785e-01
## Q113583.fctrTunes Q114517.fctrNo
## -3.039430e-02 -7.875475e-03
## Q115195.fctrNo Q115195.fctrYes
## 1.424268e-02 -5.664208e-02
## Q115390.fctrNo Q115390.fctrYes
## 9.061442e-03 -3.480745e-02
## Q115610.fctrNo Q115611.fctrNo
## 2.160419e-05 -1.544902e-01
## Q115611.fctrYes Q115899.fctrCs
## 2.352875e-01 -7.561348e-02
## Q115899.fctrMe Q116601.fctrYes
## 5.916673e-02 -2.598034e-02
## Q116797.fctrNo Q116881.fctrHappy
## 7.599480e-03 -4.842379e-02
## Q116881.fctrRight Q116953.fctrNo
## 9.311851e-02 6.894174e-02
## Q116953.fctrYes Q117186.fctrHot headed
## -1.017281e-02 2.705937e-02
## Q117193.fctrStandard hours Q118232.fctrId
## 4.839343e-03 -6.373054e-02
## Q118233.fctrNo Q118892.fctrYes
## 4.091717e-02 -2.216254e-02
## Q119650.fctrGiving Q119650.fctrReceiving
## 4.361832e-03 -4.175517e-03
## Q119851.fctrNo Q119851.fctrYes
## 9.152258e-02 -4.678190e-02
## Q120014.fctrYes Q120194.fctrStudy first
## 1.520457e-02 -3.629469e-02
## Q120379.fctrNo Q120379.fctrYes
## 4.523363e-02 -1.066065e-01
## Q120472.fctrScience Q120650.fctrNo
## 7.360688e-02 -4.395109e-02
## Q120650.fctrYes Q121699.fctrNo
## 6.562602e-02 2.082326e-02
## Q121699.fctrYes Q122120.fctrYes
## -4.024342e-02 3.808529e-02
## Q122770.fctrYes Q122771.fctrPt
## 2.805949e-02 1.034545e-01
## Q123621.fctrYes Q124122.fctrNo
## 4.321700e-03 9.442164e-03
## Q124122.fctrYes Q124742.fctrNo
## -3.009922e-02 -5.225205e-02
## Q96024.fctrNo Q98078.fctrYes
## -7.155807e-02 -3.813603e-02
## Q98197.fctrNo Q98197.fctrYes
## -2.368765e-01 8.258495e-02
## Q98869.fctrNo Q99480.fctrNo
## -1.312905e-01 -1.004262e-01
## Q99480.fctrYes YOB.Age.fctr.L
## 3.007337e-02 -5.447842e-02
## YOB.Age.fctr.Q Q109244.fctrNo:.clusterid.fctr3
## -6.924088e-04 7.748364e-02
## [1] "myfit_mdl: train diagnostics complete: 35.558000 secs"
## Prediction
## Reference D R
## D 1703 657
## R 807 1286
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.712329e-01 3.374071e-01 6.572141e-01 6.850267e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 9.859418e-82 9.853253e-05
## Prediction
## Reference D R
## D 445 146
## R 325 199
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.775785e-01 1.353530e-01 5.479643e-01 6.067822e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 7.950462e-04 2.368001e-16
## [1] "myfit_mdl: predict complete: 50.302000 secs"
## id
## 1 RFE.X#nzv#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 34.109 3.631
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6680196 0.7216102 0.614429 0.7384452
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6372646 0.6466826
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6572141 0.6850267 0.2883273
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.5531816 0.6159052 0.490458 0.5762019
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4579977 0.5775785
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5479643 0.6067822 0.135353
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.007727849 0.01661258
## [1] "myfit_mdl: exit: 50.316000 secs"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#BoxCox#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.681000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## Warning in is.na(lam): is.na() applied to non-(list or vector) of type
## 'NULL'
## [1] "myfit_mdl: train complete: 29.059000 secs"
## Length Class Mode
## a0 83 -none- numeric
## beta 20252 dgCMatrix S4
## df 83 -none- numeric
## dim 2 -none- numeric
## lambda 83 -none- numeric
## dev.ratio 83 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.231235208 0.105996862
## Hhold.fctrMKy Hhold.fctrPKn
## 0.037530839 -0.462338411
## Income.fctr.Q Income.fctr.C
## 0.050511902 0.018998965
## Q100689.fctrYes Q101163.fctrDad
## -0.055283639 0.146113017
## Q101596.fctrYes Q102089.fctrRent
## 0.036618639 -0.015340306
## Q106042.fctrNo Q106272.fctrYes
## 0.011463411 0.009424122
## Q106388.fctrYes Q106997.fctrGr
## 0.026714803 0.075133557
## Q108855.fctrYes! Q109244.fctrNo
## 0.029034122 0.424732820
## Q109244.fctrYes Q110740.fctrPC
## -1.290091615 0.083252496
## Q112478.fctrNo Q113181.fctrNo
## 0.010843412 -0.088149365
## Q113181.fctrYes Q115195.fctrYes
## 0.187631356 -0.026839083
## Q115611.fctrNo Q115611.fctrYes
## -0.142804586 0.238183824
## Q115899.fctrCs Q116881.fctrHappy
## -0.090071561 -0.008298821
## Q116881.fctrRight Q116953.fctrNo
## 0.093162156 0.028952204
## Q118232.fctrId Q119851.fctrNo
## -0.016361288 0.100215288
## Q120379.fctrYes Q120472.fctrScience
## -0.104208571 0.057685089
## Q120650.fctrYes Q122771.fctrPt
## 0.046857175 0.073870604
## Q96024.fctrNo Q98197.fctrNo
## -0.015142098 -0.317900131
## Q98197.fctrYes Q98869.fctrNo
## 0.019623012 -0.054425151
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.060237559 -0.340923455
## YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.013105017
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.2330609616 0.1054981329
## Hhold.fctrMKy Hhold.fctrPKn
## 0.0441815228 -0.4832355082
## Income.fctr.Q Income.fctr.C
## 0.0602852373 0.0347677155
## Q100689.fctrYes Q101163.fctrDad
## -0.0683272189 0.1533257769
## Q101596.fctrYes Q102089.fctrRent
## 0.0439390076 -0.0239022190
## Q104996.fctrNo Q106042.fctrNo
## 0.0043630800 0.0181892131
## Q106272.fctrYes Q106388.fctrYes
## 0.0133561866 0.0322154731
## Q106389.fctrNo Q106997.fctrGr
## 0.0034398840 0.0883487716
## Q108342.fctrOnline Q108855.fctrYes!
## -0.0024951688 0.0384230419
## Q109244.fctrNo Q109244.fctrYes
## 0.4252674971 -1.2944252294
## Q110740.fctrPC Q112478.fctrNo
## 0.0904838371 0.0206308499
## Q113181.fctrNo Q113181.fctrYes
## -0.0974065367 0.1868282743
## Q113583.fctrTunes Q115195.fctrYes
## -0.0004141873 -0.0375439703
## Q115611.fctrNo Q115611.fctrYes
## -0.1393412913 0.2431770094
## Q115899.fctrCs Q116881.fctrHappy
## -0.1011804925 -0.0184386866
## Q116881.fctrRight Q116953.fctrNo
## 0.0961084981 0.0426058122
## Q118232.fctrId Q119851.fctrNo
## -0.0266978568 0.1074911511
## Q119851.fctrYes Q120379.fctrYes
## -0.0033132601 -0.1185959917
## Q120472.fctrScience Q120650.fctrYes
## 0.0652028941 0.0591120125
## Q121699.fctrYes Q122120.fctrYes
## -0.0080339783 0.0008435008
## Q122771.fctrPt Q124742.fctrNo
## 0.0876713081 -0.0112811758
## Q96024.fctrNo Q98197.fctrNo
## -0.0246782767 -0.3250116396
## Q98197.fctrYes Q98869.fctrNo
## 0.0194484440 -0.0664120602
## Q99480.fctrNo Q99480.fctrYes
## -0.0685669208 0.0052925176
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.3783124405 -0.0181184935
## [1] "myfit_mdl: train diagnostics complete: 29.753000 secs"
## Warning in is.na(lam): is.na() applied to non-(list or vector) of type
## 'NULL'
## Warning in is.na(lam): is.na() applied to non-(list or vector) of type
## 'NULL'
## Prediction
## Reference D R
## D 1671 689
## R 807 1286
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.640467e-01 3.235116e-01 6.499576e-01 6.779203e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.083627e-73 2.486636e-03
## Warning in is.na(lam): is.na() applied to non-(list or vector) of type
## 'NULL'
## Warning in is.na(lam): is.na() applied to non-(list or vector) of type
## 'NULL'
## Prediction
## Reference D R
## D 440 151
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.766816e-01 1.343766e-01 5.470616e-01 6.058959e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 9.762675e-04 7.318358e-15
## [1] "myfit_mdl: predict complete: 44.490000 secs"
## id
## 1 RFE.X#BoxCox#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 28.258 2.818
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6612399 0.7080508 0.614429 0.7306715
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6322517 0.6475052
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6499576 0.6779203 0.2914606
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.558818 0.6023689 0.5152672 0.5757966
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4624146 0.5766816
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5470616 0.6058959 0.1343766
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.008383749 0.01784651
## [1] "myfit_mdl: exit: 44.504000 secs"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#YeoJohnson#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.672000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## [1] "myfit_mdl: train complete: 84.964000 secs"
## Length Class Mode
## a0 81 -none- numeric
## beta 19764 dgCMatrix S4
## df 81 -none- numeric
## dim 2 -none- numeric
## lambda 81 -none- numeric
## dev.ratio 81 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.228712941 0.107415501
## Hhold.fctrMKy Hhold.fctrPKn
## 0.034436590 -0.464259403
## Income.fctr.Q Income.fctr.C
## 0.048442340 0.019522380
## Q100689.fctrYes Q101163.fctrDad
## -0.055422555 0.147403002
## Q101596.fctrYes Q102089.fctrRent
## 0.037318367 -0.018301421
## Q106042.fctrNo Q106272.fctrYes
## 0.008552345 0.008668968
## Q106388.fctrYes Q106997.fctrGr
## 0.025326428 0.073337062
## Q108855.fctrYes! Q109244.fctrNo
## 0.028611081 0.425008689
## Q109244.fctrYes Q110740.fctrPC
## -1.288075237 0.083455278
## Q112478.fctrNo Q113181.fctrNo
## 0.010716892 -0.088345444
## Q113181.fctrYes Q115195.fctrYes
## 0.188519283 -0.026452784
## Q115611.fctrNo Q115611.fctrYes
## -0.144240938 0.236604688
## Q115899.fctrCs Q116881.fctrHappy
## -0.089301742 -0.008518715
## Q116881.fctrRight Q116953.fctrNo
## 0.093155040 0.029801034
## Q118232.fctrId Q119851.fctrNo
## -0.015762452 0.100497005
## Q120379.fctrYes Q120472.fctrScience
## -0.104245702 0.057699750
## Q120650.fctrYes Q122771.fctrPt
## 0.047066237 0.073925045
## Q96024.fctrNo Q98197.fctrNo
## -0.014540756 -0.317521467
## Q98197.fctrYes Q98869.fctrNo
## 0.020500210 -0.055021383
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.059165365 -0.342832843
## YOB.Age.fctr(65,90]:YOB.Age.dff
## -0.237676161
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.2297569142 0.1079047324
## Hhold.fctrMKy Hhold.fctrPKn
## 0.0402251267 -0.4856363064
## Income.fctr.Q Income.fctr.C
## 0.0596564071 0.0357207052
## Q100689.fctrYes Q101163.fctrDad
## -0.0682588684 0.1548527388
## Q101596.fctrYes Q102089.fctrRent
## 0.0448914581 -0.0282738745
## Q104996.fctrNo Q106042.fctrNo
## 0.0041833765 0.0130336784
## Q106272.fctrYes Q106388.fctrYes
## 0.0125585117 0.0296287251
## Q106389.fctrNo Q106997.fctrGr
## 0.0044176373 0.0852227850
## Q108342.fctrOnline Q108855.fctrYes!
## -0.0023239299 0.0376319987
## Q109244.fctrNo Q109244.fctrYes
## 0.4252595830 -1.2913407326
## Q110740.fctrPC Q112478.fctrNo
## 0.0907048644 0.0206593404
## Q113181.fctrNo Q113181.fctrYes
## -0.0977225377 0.1881646788
## Q115195.fctrYes Q115611.fctrNo
## -0.0369663699 -0.1416736326
## Q115611.fctrYes Q115899.fctrCs
## 0.2408177914 -0.1002194448
## Q115899.fctrMe Q116881.fctrHappy
## 0.0000511139 -0.0186031368
## Q116881.fctrRight Q116953.fctrNo
## 0.0963058117 0.0439856160
## Q118232.fctrId Q119851.fctrNo
## -0.0258430535 0.1084953959
## Q119851.fctrYes Q120379.fctrYes
## -0.0020212076 -0.1192806573
## Q120472.fctrScience Q120650.fctrYes
## 0.0651315899 0.0597460999
## Q121699.fctrYes Q122120.fctrYes
## -0.0096462412 0.0012991928
## Q122771.fctrPt Q124742.fctrNo
## 0.0875805467 -0.0112356718
## Q96024.fctrNo Q98197.fctrNo
## -0.0239596127 -0.3246507380
## Q98197.fctrYes Q98869.fctrNo
## 0.0200585916 -0.0674008936
## Q99480.fctrNo Q99480.fctrYes
## -0.0660079473 0.0071631943
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(65,90]:YOB.Age.dff
## -0.3813604844 -0.4846379340
## [1] "myfit_mdl: train diagnostics complete: 85.715000 secs"
## Prediction
## Reference D R
## D 1668 692
## R 808 1285
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.631484e-01 3.217396e-01 6.490508e-01 6.770318e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.019817e-72 2.984914e-03
## Prediction
## Reference D R
## D 441 150
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.775785e-01 1.361153e-01 5.479643e-01 6.067822e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 7.950462e-04 4.756579e-15
## [1] "myfit_mdl: predict complete: 100.799000 secs"
## id
## 1 RFE.X#YeoJohnson#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 84.187 5.299
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6603655 0.7067797 0.6139513 0.7304481
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6314496 0.646682
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6490508 0.6770318 0.2897892
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.5559554 0.6023689 0.509542 0.5744824
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4629418 0.5775785
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5479643 0.6067822 0.1361153
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.009891453 0.0211372
## [1] "myfit_mdl: exit: 100.813000 secs"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#expoTrans#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.711000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## [1] "myfit_mdl: train complete: 72.282000 secs"
## Length Class Mode
## a0 85 -none- numeric
## beta 20740 dgCMatrix S4
## df 85 -none- numeric
## dim 2 -none- numeric
## lambda 85 -none- numeric
## dev.ratio 85 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.229098042 0.107394379
## Hhold.fctrMKy Hhold.fctrPKn
## 0.034422111 -0.464105342
## Income.fctr.Q Income.fctr.C
## 0.049393481 0.019619310
## Q100689.fctrYes Q101163.fctrDad
## -0.055394422 0.147391603
## Q101596.fctrYes Q102089.fctrRent
## 0.037344567 -0.018173644
## Q106042.fctrNo Q106272.fctrYes
## 0.008690451 0.008610264
## Q106388.fctrYes Q106997.fctrGr
## 0.025327041 0.073396346
## Q108855.fctrYes! Q109244.fctrNo
## 0.028625362 0.424991362
## Q109244.fctrYes Q110740.fctrPC
## -1.288112124 0.083467912
## Q112478.fctrNo Q113181.fctrNo
## 0.010695201 -0.088351503
## Q113181.fctrYes Q115195.fctrYes
## 0.188497544 -0.026469048
## Q115611.fctrNo Q115611.fctrYes
## -0.144234774 0.236633511
## Q115899.fctrCs Q116881.fctrHappy
## -0.089277386 -0.008548772
## Q116881.fctrRight Q116953.fctrNo
## 0.093158217 0.029779802
## Q118232.fctrId Q119851.fctrNo
## -0.015737527 0.100547671
## Q120379.fctrYes Q120472.fctrScience
## -0.104247280 0.057687257
## Q120650.fctrYes Q122771.fctrPt
## 0.047044001 0.073850710
## Q96024.fctrNo Q98197.fctrNo
## -0.014536822 -0.317502908
## Q98197.fctrYes Q98869.fctrNo
## 0.020513032 -0.055032575
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.059189157 -0.342807544
## YOB.Age.fctr(65,90]:YOB.Age.dff
## -0.065951307
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -2.302114e-01 1.078878e-01
## Hhold.fctrMKy Hhold.fctrPKn
## 4.021919e-02 -4.854574e-01
## Income.fctr.Q Income.fctr.C
## 6.065722e-02 3.581957e-02
## Q100689.fctrYes Q101163.fctrDad
## -6.824489e-02 1.548356e-01
## Q101596.fctrYes Q102089.fctrRent
## 4.491433e-02 -2.814352e-02
## Q104996.fctrNo Q105840.fctrNo
## 4.230886e-03 6.034211e-06
## Q106042.fctrNo Q106272.fctrYes
## 1.317792e-02 1.250495e-02
## Q106388.fctrYes Q106389.fctrNo
## 2.962558e-02 4.398667e-03
## Q106997.fctrGr Q108342.fctrOnline
## 8.528124e-02 -2.277371e-03
## Q108855.fctrYes! Q109244.fctrNo
## 3.765072e-02 4.252412e-01
## Q109244.fctrYes Q110740.fctrPC
## -1.291377e+00 9.071534e-02
## Q112478.fctrNo Q113181.fctrNo
## 2.064490e-02 -9.772791e-02
## Q113181.fctrYes Q115195.fctrYes
## 1.881404e-01 -3.698247e-02
## Q115611.fctrNo Q115611.fctrYes
## -1.416558e-01 2.408582e-01
## Q115899.fctrCs Q115899.fctrMe
## -1.001949e-01 4.546107e-05
## Q116881.fctrHappy Q116881.fctrRight
## -1.863139e-02 9.630377e-02
## Q116953.fctrNo Q118232.fctrId
## 4.396077e-02 -2.582406e-02
## Q119851.fctrNo Q119851.fctrYes
## 1.085368e-01 -2.032027e-03
## Q120379.fctrYes Q120472.fctrScience
## -1.192833e-01 6.512244e-02
## Q120650.fctrYes Q121699.fctrYes
## 5.972641e-02 -9.631422e-03
## Q122120.fctrYes Q122771.fctrPt
## 1.300298e-03 8.750221e-02
## Q124742.fctrNo Q96024.fctrNo
## -1.125548e-02 -2.395966e-02
## Q98197.fctrNo Q98197.fctrYes
## -3.246366e-01 2.007295e-02
## Q98869.fctrNo Q99480.fctrNo
## -6.742075e-02 -6.603982e-02
## Q99480.fctrYes Q109244.fctrYes:.clusterid.fctr3
## 7.152988e-03 -3.813318e-01
## YOB.Age.fctr(35,40]:YOB.Age.dff YOB.Age.fctr(65,90]:YOB.Age.dff
## -2.229490e-04 -1.380386e-01
## [1] "myfit_mdl: train diagnostics complete: 72.953000 secs"
## Prediction
## Reference D R
## D 1668 692
## R 809 1284
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.629239e-01 3.212691e-01 6.488241e-01 6.768097e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.781739e-72 2.752474e-03
## Prediction
## Reference D R
## D 441 150
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.775785e-01 1.361153e-01 5.479643e-01 6.067822e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 7.950462e-04 4.756579e-15
## [1] "myfit_mdl: predict complete: 87.912000 secs"
## id
## 1 RFE.X#expoTrans#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 71.462 6.963
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6601266 0.7067797 0.6134735 0.7304639
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6311133 0.6462327
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6488241 0.6768097 0.288888
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.5559554 0.6023689 0.509542 0.5745421
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4629418 0.5775785
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5479643 0.6067822 0.1361153
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.009369209 0.02006512
## [1] "myfit_mdl: exit: 87.926000 secs"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#center#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.696000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## [1] "myfit_mdl: train complete: 26.562000 secs"
## Length Class Mode
## a0 83 -none- numeric
## beta 20252 dgCMatrix S4
## df 83 -none- numeric
## dim 2 -none- numeric
## lambda 83 -none- numeric
## dev.ratio 83 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.166959545 0.105996862
## Hhold.fctrMKy Hhold.fctrPKn
## 0.037530839 -0.462338411
## Income.fctr.Q Income.fctr.C
## 0.050511902 0.018998965
## Q100689.fctrYes Q101163.fctrDad
## -0.055283639 0.146113017
## Q101596.fctrYes Q102089.fctrRent
## 0.036618639 -0.015340306
## Q106042.fctrNo Q106272.fctrYes
## 0.011463411 0.009424122
## Q106388.fctrYes Q106997.fctrGr
## 0.026714803 0.075133557
## Q108855.fctrYes! Q109244.fctrNo
## 0.029034122 0.424732820
## Q109244.fctrYes Q110740.fctrPC
## -1.290091615 0.083252496
## Q112478.fctrNo Q113181.fctrNo
## 0.010843412 -0.088149365
## Q113181.fctrYes Q115195.fctrYes
## 0.187631356 -0.026839083
## Q115611.fctrNo Q115611.fctrYes
## -0.142804586 0.238183824
## Q115899.fctrCs Q116881.fctrHappy
## -0.090071561 -0.008298821
## Q116881.fctrRight Q116953.fctrNo
## 0.093162156 0.028952204
## Q118232.fctrId Q119851.fctrNo
## -0.016361288 0.100215288
## Q120379.fctrYes Q120472.fctrScience
## -0.104208571 0.057685089
## Q120650.fctrYes Q122771.fctrPt
## 0.046857175 0.073870604
## Q96024.fctrNo Q98197.fctrNo
## -0.015142098 -0.317900131
## Q98197.fctrYes Q98869.fctrNo
## 0.019623012 -0.054425151
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.060237559 -0.340923455
## YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.013105017
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.1683636750 0.1054981329
## Hhold.fctrMKy Hhold.fctrPKn
## 0.0441815228 -0.4832355082
## Income.fctr.Q Income.fctr.C
## 0.0602852373 0.0347677155
## Q100689.fctrYes Q101163.fctrDad
## -0.0683272189 0.1533257769
## Q101596.fctrYes Q102089.fctrRent
## 0.0439390076 -0.0239022190
## Q104996.fctrNo Q106042.fctrNo
## 0.0043630800 0.0181892131
## Q106272.fctrYes Q106388.fctrYes
## 0.0133561866 0.0322154731
## Q106389.fctrNo Q106997.fctrGr
## 0.0034398840 0.0883487716
## Q108342.fctrOnline Q108855.fctrYes!
## -0.0024951688 0.0384230419
## Q109244.fctrNo Q109244.fctrYes
## 0.4252674971 -1.2944252294
## Q110740.fctrPC Q112478.fctrNo
## 0.0904838371 0.0206308499
## Q113181.fctrNo Q113181.fctrYes
## -0.0974065367 0.1868282743
## Q113583.fctrTunes Q115195.fctrYes
## -0.0004141873 -0.0375439703
## Q115611.fctrNo Q115611.fctrYes
## -0.1393412913 0.2431770094
## Q115899.fctrCs Q116881.fctrHappy
## -0.1011804925 -0.0184386866
## Q116881.fctrRight Q116953.fctrNo
## 0.0961084981 0.0426058122
## Q118232.fctrId Q119851.fctrNo
## -0.0266978568 0.1074911511
## Q119851.fctrYes Q120379.fctrYes
## -0.0033132601 -0.1185959917
## Q120472.fctrScience Q120650.fctrYes
## 0.0652028941 0.0591120125
## Q121699.fctrYes Q122120.fctrYes
## -0.0080339783 0.0008435008
## Q122771.fctrPt Q124742.fctrNo
## 0.0876713081 -0.0112811758
## Q96024.fctrNo Q98197.fctrNo
## -0.0246782767 -0.3250116396
## Q98197.fctrYes Q98869.fctrNo
## 0.0194484440 -0.0664120602
## Q99480.fctrNo Q99480.fctrYes
## -0.0685669208 0.0052925176
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.3783124405 -0.0181184935
## [1] "myfit_mdl: train diagnostics complete: 27.220000 secs"
## Prediction
## Reference D R
## D 1671 689
## R 807 1286
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.640467e-01 3.235116e-01 6.499576e-01 6.779203e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.083627e-73 2.486636e-03
## Prediction
## Reference D R
## D 440 151
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.766816e-01 1.343766e-01 5.470616e-01 6.058959e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 9.762675e-04 7.318358e-15
## [1] "myfit_mdl: predict complete: 43.044000 secs"
## id
## 1 RFE.X#center#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 25.755 2.345
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6612399 0.7080508 0.614429 0.7306715
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6322517 0.6475052
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6499576 0.6779203 0.2914606
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.558818 0.6023689 0.5152672 0.5757966
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4624146 0.5766816
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5470616 0.6058959 0.1343766
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.008383749 0.01784651
## [1] "myfit_mdl: exit: 43.058000 secs"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#scale#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.671000 secs"
## Warning in preProcess.default(method = "scale", x =
## structure(c(0.231455024943138, : These variables have zero variances:
## YOB.Age.fctrNA:YOB.Age.dff
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "scale", x
## = structure(c(0.231455024943138, : These variables have zero variances:
## YOB.Age.fctrNA:YOB.Age.dff
## [1] "myfit_mdl: train complete: 26.429000 secs"
## Length Class Mode
## a0 83 -none- numeric
## beta 20252 dgCMatrix S4
## df 83 -none- numeric
## dim 2 -none- numeric
## lambda 83 -none- numeric
## dev.ratio 83 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.231235208 0.052018176
## Hhold.fctrMKy Hhold.fctrPKn
## 0.016983339 -0.081519725
## Income.fctr.Q Income.fctr.C
## 0.019568156 0.007140334
## Q100689.fctrYes Q101163.fctrDad
## -0.026814870 0.068379039
## Q101596.fctrYes Q102089.fctrRent
## 0.014915987 -0.006064329
## Q106042.fctrNo Q106272.fctrYes
## 0.005317601 0.004670332
## Q106388.fctrYes Q106997.fctrGr
## 0.009940111 0.035255811
## Q108855.fctrYes! Q109244.fctrNo
## 0.013748596 0.210874814
## Q109244.fctrYes Q110740.fctrPC
## -0.481833880 0.040246042
## Q112478.fctrNo Q113181.fctrNo
## 0.004606523 -0.042333265
## Q113181.fctrYes Q115195.fctrYes
## 0.083127713 -0.013166594
## Q115611.fctrNo Q115611.fctrYes
## -0.070387426 0.101119278
## Q115899.fctrCs Q116881.fctrHappy
## -0.039851967 -0.004088828
## Q116881.fctrRight Q116953.fctrNo
## 0.035343803 0.011490478
## Q118232.fctrId Q119851.fctrNo
## -0.007137177 0.048962028
## Q120379.fctrYes Q120472.fctrScience
## -0.048177769 0.028688080
## Q120650.fctrYes Q122771.fctrPt
## 0.022797046 0.022994870
## Q96024.fctrNo Q98197.fctrNo
## -0.006341782 -0.152226754
## Q98197.fctrYes Q98869.fctrNo
## 0.008325320 -0.018400584
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.020424517 -0.061909810
## YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.012419043
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.2330609616 0.0517734242
## Hhold.fctrMKy Hhold.fctrPKn
## 0.0199928860 -0.0852043107
## Income.fctr.Q Income.fctr.C
## 0.0233543160 0.0130666653
## Q100689.fctrYes Q101163.fctrDad
## -0.0331415498 0.0717545188
## Q101596.fctrYes Q102089.fctrRent
## 0.0178978161 -0.0094490233
## Q104996.fctrNo Q106042.fctrNo
## 0.0020013876 0.0084375397
## Q106272.fctrYes Q106388.fctrYes
## 0.0066189537 0.0119868137
## Q106389.fctrNo Q106997.fctrGr
## 0.0015884106 0.0414569426
## Q108342.fctrOnline Q108855.fctrYes!
## -0.0009855207 0.0181945528
## Q109244.fctrNo Q109244.fctrYes
## 0.2111402744 -0.4834524333
## Q110740.fctrPC Q112478.fctrNo
## 0.0437418273 0.0087644442
## Q113181.fctrNo Q113181.fctrYes
## -0.0467789728 0.0827719183
## Q113583.fctrTunes Q115195.fctrYes
## -0.0002038063 -0.0184181492
## Q115611.fctrNo Q115611.fctrYes
## -0.0686803913 0.1032391005
## Q115899.fctrCs Q116881.fctrHappy
## -0.0447670901 -0.0090847383
## Q116881.fctrRight Q116953.fctrNo
## 0.0364615847 0.0169092882
## Q118232.fctrId Q119851.fctrNo
## -0.0116462302 0.0525167850
## Q119851.fctrYes Q120379.fctrYes
## -0.0015003540 -0.0548293698
## Q120472.fctrScience Q120650.fctrYes
## 0.0324268519 0.0287592938
## Q121699.fctrYes Q122120.fctrYes
## -0.0040165259 0.0003088309
## Q122771.fctrPt Q124742.fctrNo
## 0.0272908330 -0.0048358241
## Q96024.fctrNo Q98197.fctrNo
## -0.0103357049 -0.1556321066
## Q98197.fctrYes Q98869.fctrNo
## 0.0082512574 -0.0224532350
## Q99480.fctrNo Q99480.fctrYes
## -0.0232487218 0.0026432947
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.0686994425 -0.0171700924
## [1] "myfit_mdl: train diagnostics complete: 27.121000 secs"
## Prediction
## Reference D R
## D 1671 689
## R 807 1286
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.640467e-01 3.235116e-01 6.499576e-01 6.779203e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.083627e-73 2.486636e-03
## Prediction
## Reference D R
## D 440 151
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.766816e-01 1.343766e-01 5.470616e-01 6.058959e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 9.762675e-04 7.318358e-15
## [1] "myfit_mdl: predict complete: 41.971000 secs"
## id
## 1 RFE.X#scale#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 25.649 2.485
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6612399 0.7080508 0.614429 0.7306715
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6322517 0.6475052
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6499576 0.6779203 0.2914606
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.558818 0.6023689 0.5152672 0.5757966
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4624146 0.5766816
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5470616 0.6058959 0.1343766
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.008383749 0.01784651
## [1] "myfit_mdl: exit: 41.986000 secs"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#center.scale#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.724000 secs"
## Warning in preProcess.default(method = c("center", "scale"), x =
## structure(c(0.231455024943138, : These variables have zero variances:
## YOB.Age.fctrNA:YOB.Age.dff
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## Warning in preProcess.default(thresh = 0.95, k = 5, method = c("center", :
## These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## [1] "myfit_mdl: train complete: 30.502000 secs"
## Length Class Mode
## a0 83 -none- numeric
## beta 20252 dgCMatrix S4
## df 83 -none- numeric
## dim 2 -none- numeric
## lambda 83 -none- numeric
## dev.ratio 83 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.166959545 0.052018176
## Hhold.fctrMKy Hhold.fctrPKn
## 0.016983339 -0.081519725
## Income.fctr.Q Income.fctr.C
## 0.019568156 0.007140334
## Q100689.fctrYes Q101163.fctrDad
## -0.026814870 0.068379039
## Q101596.fctrYes Q102089.fctrRent
## 0.014915987 -0.006064329
## Q106042.fctrNo Q106272.fctrYes
## 0.005317601 0.004670332
## Q106388.fctrYes Q106997.fctrGr
## 0.009940111 0.035255811
## Q108855.fctrYes! Q109244.fctrNo
## 0.013748596 0.210874814
## Q109244.fctrYes Q110740.fctrPC
## -0.481833880 0.040246042
## Q112478.fctrNo Q113181.fctrNo
## 0.004606523 -0.042333265
## Q113181.fctrYes Q115195.fctrYes
## 0.083127713 -0.013166594
## Q115611.fctrNo Q115611.fctrYes
## -0.070387426 0.101119278
## Q115899.fctrCs Q116881.fctrHappy
## -0.039851967 -0.004088828
## Q116881.fctrRight Q116953.fctrNo
## 0.035343803 0.011490478
## Q118232.fctrId Q119851.fctrNo
## -0.007137177 0.048962028
## Q120379.fctrYes Q120472.fctrScience
## -0.048177769 0.028688080
## Q120650.fctrYes Q122771.fctrPt
## 0.022797046 0.022994870
## Q96024.fctrNo Q98197.fctrNo
## -0.006341782 -0.152226754
## Q98197.fctrYes Q98869.fctrNo
## 0.008325320 -0.018400584
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.020424517 -0.061909810
## YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.012419043
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.1683636750 0.0517734242
## Hhold.fctrMKy Hhold.fctrPKn
## 0.0199928860 -0.0852043107
## Income.fctr.Q Income.fctr.C
## 0.0233543160 0.0130666653
## Q100689.fctrYes Q101163.fctrDad
## -0.0331415498 0.0717545188
## Q101596.fctrYes Q102089.fctrRent
## 0.0178978161 -0.0094490233
## Q104996.fctrNo Q106042.fctrNo
## 0.0020013876 0.0084375397
## Q106272.fctrYes Q106388.fctrYes
## 0.0066189537 0.0119868137
## Q106389.fctrNo Q106997.fctrGr
## 0.0015884106 0.0414569426
## Q108342.fctrOnline Q108855.fctrYes!
## -0.0009855207 0.0181945528
## Q109244.fctrNo Q109244.fctrYes
## 0.2111402744 -0.4834524333
## Q110740.fctrPC Q112478.fctrNo
## 0.0437418273 0.0087644442
## Q113181.fctrNo Q113181.fctrYes
## -0.0467789728 0.0827719183
## Q113583.fctrTunes Q115195.fctrYes
## -0.0002038063 -0.0184181492
## Q115611.fctrNo Q115611.fctrYes
## -0.0686803913 0.1032391005
## Q115899.fctrCs Q116881.fctrHappy
## -0.0447670901 -0.0090847383
## Q116881.fctrRight Q116953.fctrNo
## 0.0364615847 0.0169092882
## Q118232.fctrId Q119851.fctrNo
## -0.0116462302 0.0525167850
## Q119851.fctrYes Q120379.fctrYes
## -0.0015003540 -0.0548293698
## Q120472.fctrScience Q120650.fctrYes
## 0.0324268519 0.0287592938
## Q121699.fctrYes Q122120.fctrYes
## -0.0040165259 0.0003088309
## Q122771.fctrPt Q124742.fctrNo
## 0.0272908330 -0.0048358241
## Q96024.fctrNo Q98197.fctrNo
## -0.0103357049 -0.1556321066
## Q98197.fctrYes Q98869.fctrNo
## 0.0082512574 -0.0224532350
## Q99480.fctrNo Q99480.fctrYes
## -0.0232487218 0.0026432947
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.0686994425 -0.0171700924
## [1] "myfit_mdl: train diagnostics complete: 31.167000 secs"
## Prediction
## Reference D R
## D 1671 689
## R 807 1286
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.640467e-01 3.235116e-01 6.499576e-01 6.779203e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.083627e-73 2.486636e-03
## Prediction
## Reference D R
## D 440 151
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.766816e-01 1.343766e-01 5.470616e-01 6.058959e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 9.762675e-04 7.318358e-15
## [1] "myfit_mdl: predict complete: 46.133000 secs"
## id
## 1 RFE.X#center.scale#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 29.657 2.713
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6612399 0.7080508 0.614429 0.7306715
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6322517 0.6475052
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6499576 0.6779203 0.2914606
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.558818 0.6023689 0.5152672 0.5757966
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4624146 0.5766816
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5470616 0.6058959 0.1343766
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.008383749 0.01784651
## [1] "myfit_mdl: exit: 46.147000 secs"
## [1] "\nmyfit_mdl: enter: 0.000000 secs"
## [1] "fitting model: RFE.X#range#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.672000 secs"
## Warning in preProcess.default(method = "range", x =
## structure(c(0.231455024943138, : No variation for for:
## YOB.Age.fctrNA:YOB.Age.dff
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## Warning in preProcess.default(thresh = 0.95, k = 5, method =
## "range", x = structure(c(0.231455024943138, : No variation for for:
## YOB.Age.fctrNA:YOB.Age.dff
## [1] "myfit_mdl: train complete: 27.905000 secs"
## Length Class Mode
## a0 83 -none- numeric
## beta 20252 dgCMatrix S4
## df 83 -none- numeric
## dim 2 -none- numeric
## lambda 83 -none- numeric
## dev.ratio 83 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.261036705 0.105996862
## Hhold.fctrMKy Hhold.fctrPKn
## 0.037530839 -0.462338411
## Income.fctr.Q Income.fctr.C
## 0.049601703 0.015512590
## Q100689.fctrYes Q101163.fctrDad
## -0.055283639 0.146113017
## Q101596.fctrYes Q102089.fctrRent
## 0.036618639 -0.015340306
## Q106042.fctrNo Q106272.fctrYes
## 0.011463411 0.009424122
## Q106388.fctrYes Q106997.fctrGr
## 0.026714803 0.075133557
## Q108855.fctrYes! Q109244.fctrNo
## 0.029034122 0.424732820
## Q109244.fctrYes Q110740.fctrPC
## -1.290091615 0.083252496
## Q112478.fctrNo Q113181.fctrNo
## 0.010843412 -0.088149365
## Q113181.fctrYes Q115195.fctrYes
## 0.187631356 -0.026839083
## Q115611.fctrNo Q115611.fctrYes
## -0.142804586 0.238183824
## Q115899.fctrCs Q116881.fctrHappy
## -0.090071561 -0.008298821
## Q116881.fctrRight Q116953.fctrNo
## 0.093162156 0.028952204
## Q118232.fctrId Q119851.fctrNo
## -0.016361288 0.100215288
## Q120379.fctrYes Q120472.fctrScience
## -0.104208571 0.057685089
## Q120650.fctrYes Q122771.fctrPt
## 0.046857175 0.073870604
## Q96024.fctrNo Q98197.fctrNo
## -0.015142098 -0.317900131
## Q98197.fctrYes Q98869.fctrNo
## 0.019623012 -0.054425151
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.060237559 -0.340923455
## YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.065525084
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.2735654566 0.1054981329
## Hhold.fctrMKy Hhold.fctrPKn
## 0.0441815228 -0.4832355082
## Income.fctr.Q Income.fctr.C
## 0.0591989278 0.0283877209
## Q100689.fctrYes Q101163.fctrDad
## -0.0683272189 0.1533257769
## Q101596.fctrYes Q102089.fctrRent
## 0.0439390076 -0.0239022190
## Q104996.fctrNo Q106042.fctrNo
## 0.0043630800 0.0181892131
## Q106272.fctrYes Q106388.fctrYes
## 0.0133561866 0.0322154731
## Q106389.fctrNo Q106997.fctrGr
## 0.0034398840 0.0883487716
## Q108342.fctrOnline Q108855.fctrYes!
## -0.0024951688 0.0384230419
## Q109244.fctrNo Q109244.fctrYes
## 0.4252674971 -1.2944252294
## Q110740.fctrPC Q112478.fctrNo
## 0.0904838371 0.0206308499
## Q113181.fctrNo Q113181.fctrYes
## -0.0974065367 0.1868282743
## Q113583.fctrTunes Q115195.fctrYes
## -0.0004141873 -0.0375439703
## Q115611.fctrNo Q115611.fctrYes
## -0.1393412913 0.2431770094
## Q115899.fctrCs Q116881.fctrHappy
## -0.1011804925 -0.0184386866
## Q116881.fctrRight Q116953.fctrNo
## 0.0961084981 0.0426058122
## Q118232.fctrId Q119851.fctrNo
## -0.0266978568 0.1074911511
## Q119851.fctrYes Q120379.fctrYes
## -0.0033132601 -0.1185959917
## Q120472.fctrScience Q120650.fctrYes
## 0.0652028941 0.0591120125
## Q121699.fctrYes Q122120.fctrYes
## -0.0080339783 0.0008435008
## Q122771.fctrPt Q124742.fctrNo
## 0.0876713081 -0.0112811758
## Q96024.fctrNo Q98197.fctrNo
## -0.0246782767 -0.3250116396
## Q98197.fctrYes Q98869.fctrNo
## 0.0194484440 -0.0664120602
## Q99480.fctrNo Q99480.fctrYes
## -0.0685669208 0.0052925176
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.3783124405 -0.0905924673
## [1] "myfit_mdl: train diagnostics complete: 28.576000 secs"
## Prediction
## Reference D R
## D 1671 689
## R 807 1286
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.640467e-01 3.235116e-01 6.499576e-01 6.779203e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.083627e-73 2.486636e-03
## Prediction
## Reference D R
## D 440 151
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.766816e-01 1.343766e-01 5.470616e-01 6.058959e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 9.762675e-04 7.318358e-15
## [1] "myfit_mdl: predict complete: 43.528000 secs"
## id
## 1 RFE.X#range#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 27.116 2.526
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6612399 0.7080508 0.614429 0.7306715
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6322517 0.6475052
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6499576 0.6779203 0.2914606
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.558818 0.6023689 0.5152672 0.5757966
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4624146 0.5766816
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5470616 0.6058959 0.1343766
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.008383749 0.01784651
## [1] "myfit_mdl: exit: 43.543000 secs"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#zv.pca#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.677000 secs"
## + Fold1.Rep1: alpha=0.100, lambda=0.04123
## - Fold1.Rep1: alpha=0.100, lambda=0.04123
## + Fold1.Rep1: alpha=0.325, lambda=0.04123
## - Fold1.Rep1: alpha=0.325, lambda=0.04123
## + Fold1.Rep1: alpha=0.550, lambda=0.04123
## - Fold1.Rep1: alpha=0.550, lambda=0.04123
## + Fold1.Rep1: alpha=0.775, lambda=0.04123
## - Fold1.Rep1: alpha=0.775, lambda=0.04123
## + Fold1.Rep1: alpha=1.000, lambda=0.04123
## - Fold1.Rep1: alpha=1.000, lambda=0.04123
## + Fold2.Rep1: alpha=0.100, lambda=0.04123
## - Fold2.Rep1: alpha=0.100, lambda=0.04123
## + Fold2.Rep1: alpha=0.325, lambda=0.04123
## - Fold2.Rep1: alpha=0.325, lambda=0.04123
## + Fold2.Rep1: alpha=0.550, lambda=0.04123
## - Fold2.Rep1: alpha=0.550, lambda=0.04123
## + Fold2.Rep1: alpha=0.775, lambda=0.04123
## - Fold2.Rep1: alpha=0.775, lambda=0.04123
## + Fold2.Rep1: alpha=1.000, lambda=0.04123
## - Fold2.Rep1: alpha=1.000, lambda=0.04123
## + Fold3.Rep1: alpha=0.100, lambda=0.04123
## - Fold3.Rep1: alpha=0.100, lambda=0.04123
## + Fold3.Rep1: alpha=0.325, lambda=0.04123
## - Fold3.Rep1: alpha=0.325, lambda=0.04123
## + Fold3.Rep1: alpha=0.550, lambda=0.04123
## - Fold3.Rep1: alpha=0.550, lambda=0.04123
## + Fold3.Rep1: alpha=0.775, lambda=0.04123
## - Fold3.Rep1: alpha=0.775, lambda=0.04123
## + Fold3.Rep1: alpha=1.000, lambda=0.04123
## - Fold3.Rep1: alpha=1.000, lambda=0.04123
## + Fold1.Rep2: alpha=0.100, lambda=0.04123
## - Fold1.Rep2: alpha=0.100, lambda=0.04123
## + Fold1.Rep2: alpha=0.325, lambda=0.04123
## - Fold1.Rep2: alpha=0.325, lambda=0.04123
## + Fold1.Rep2: alpha=0.550, lambda=0.04123
## - Fold1.Rep2: alpha=0.550, lambda=0.04123
## + Fold1.Rep2: alpha=0.775, lambda=0.04123
## - Fold1.Rep2: alpha=0.775, lambda=0.04123
## + Fold1.Rep2: alpha=1.000, lambda=0.04123
## - Fold1.Rep2: alpha=1.000, lambda=0.04123
## + Fold2.Rep2: alpha=0.100, lambda=0.04123
## - Fold2.Rep2: alpha=0.100, lambda=0.04123
## + Fold2.Rep2: alpha=0.325, lambda=0.04123
## - Fold2.Rep2: alpha=0.325, lambda=0.04123
## + Fold2.Rep2: alpha=0.550, lambda=0.04123
## - Fold2.Rep2: alpha=0.550, lambda=0.04123
## + Fold2.Rep2: alpha=0.775, lambda=0.04123
## - Fold2.Rep2: alpha=0.775, lambda=0.04123
## + Fold2.Rep2: alpha=1.000, lambda=0.04123
## - Fold2.Rep2: alpha=1.000, lambda=0.04123
## + Fold3.Rep2: alpha=0.100, lambda=0.04123
## - Fold3.Rep2: alpha=0.100, lambda=0.04123
## + Fold3.Rep2: alpha=0.325, lambda=0.04123
## - Fold3.Rep2: alpha=0.325, lambda=0.04123
## + Fold3.Rep2: alpha=0.550, lambda=0.04123
## - Fold3.Rep2: alpha=0.550, lambda=0.04123
## + Fold3.Rep2: alpha=0.775, lambda=0.04123
## - Fold3.Rep2: alpha=0.775, lambda=0.04123
## + Fold3.Rep2: alpha=1.000, lambda=0.04123
## - Fold3.Rep2: alpha=1.000, lambda=0.04123
## + Fold1.Rep3: alpha=0.100, lambda=0.04123
## - Fold1.Rep3: alpha=0.100, lambda=0.04123
## + Fold1.Rep3: alpha=0.325, lambda=0.04123
## - Fold1.Rep3: alpha=0.325, lambda=0.04123
## + Fold1.Rep3: alpha=0.550, lambda=0.04123
## - Fold1.Rep3: alpha=0.550, lambda=0.04123
## + Fold1.Rep3: alpha=0.775, lambda=0.04123
## - Fold1.Rep3: alpha=0.775, lambda=0.04123
## + Fold1.Rep3: alpha=1.000, lambda=0.04123
## - Fold1.Rep3: alpha=1.000, lambda=0.04123
## + Fold2.Rep3: alpha=0.100, lambda=0.04123
## - Fold2.Rep3: alpha=0.100, lambda=0.04123
## + Fold2.Rep3: alpha=0.325, lambda=0.04123
## - Fold2.Rep3: alpha=0.325, lambda=0.04123
## + Fold2.Rep3: alpha=0.550, lambda=0.04123
## - Fold2.Rep3: alpha=0.550, lambda=0.04123
## + Fold2.Rep3: alpha=0.775, lambda=0.04123
## - Fold2.Rep3: alpha=0.775, lambda=0.04123
## + Fold2.Rep3: alpha=1.000, lambda=0.04123
## - Fold2.Rep3: alpha=1.000, lambda=0.04123
## + Fold3.Rep3: alpha=0.100, lambda=0.04123
## - Fold3.Rep3: alpha=0.100, lambda=0.04123
## + Fold3.Rep3: alpha=0.325, lambda=0.04123
## - Fold3.Rep3: alpha=0.325, lambda=0.04123
## + Fold3.Rep3: alpha=0.550, lambda=0.04123
## - Fold3.Rep3: alpha=0.550, lambda=0.04123
## + Fold3.Rep3: alpha=0.775, lambda=0.04123
## - Fold3.Rep3: alpha=0.775, lambda=0.04123
## + Fold3.Rep3: alpha=1.000, lambda=0.04123
## - Fold3.Rep3: alpha=1.000, lambda=0.04123
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.00888 on full training set
## [1] "myfit_mdl: train complete: 76.156000 secs"
## Length Class Mode
## a0 65 -none- numeric
## beta 9490 dgCMatrix S4
## df 65 -none- numeric
## dim 2 -none- numeric
## lambda 65 -none- numeric
## dev.ratio 65 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 146 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) PC1 PC2 PC3 PC4
## -1.529068e-01 -3.296689e-03 2.496272e-02 1.013809e-01 9.822775e-03
## PC5 PC6 PC8 PC9 PC10
## 1.812875e-01 -1.900698e-02 2.268886e-01 -1.264570e-01 1.508719e-01
## PC11 PC14 PC15 PC16 PC17
## 2.363857e-02 9.937077e-02 -1.430308e-01 4.605892e-02 -1.804329e-02
## PC19 PC20 PC22 PC23 PC25
## 5.259198e-02 1.407052e-02 -3.230118e-02 3.309344e-02 5.322469e-02
## PC26 PC27 PC30 PC33 PC35
## -1.141436e-01 -1.429851e-02 5.776065e-02 3.267352e-03 -9.304761e-03
## PC40 PC44 PC45 PC47 PC49
## 3.326430e-02 -9.794838e-03 -2.811805e-02 1.450679e-02 6.499491e-03
## PC51 PC52 PC54 PC57 PC68
## -3.570168e-03 4.763282e-02 -1.200383e-02 -6.979516e-02 -6.030462e-02
## PC70 PC74 PC75 PC77 PC84
## 1.580644e-02 1.175927e-02 -1.758019e-03 -1.951356e-02 7.934667e-03
## PC85 PC87 PC88 PC92 PC95
## -1.071301e-02 1.241740e-02 -5.540789e-02 1.330521e-02 -1.341519e-02
## PC100 PC101 PC102 PC103 PC106
## 3.199860e-02 2.761243e-02 -6.692650e-03 4.066748e-03 1.438623e-02
## PC108 PC109 PC111 PC113 PC114
## 1.391280e-02 1.007631e-02 -1.256736e-02 -5.280653e-03 -3.661258e-02
## PC117 PC118 PC123 PC124 PC126
## 1.213232e-02 1.018140e-02 7.654465e-05 -4.931831e-02 2.833828e-02
## PC128 PC130 PC138 PC140 PC142
## 5.401258e-02 3.531961e-03 2.877747e-02 1.043563e-02 -3.859155e-02
## PC144
## 1.148179e-02
## [1] "max lambda < lambdaOpt:"
## (Intercept) PC1 PC2 PC3 PC4
## -1.547406e-01 -3.605930e-03 2.605194e-02 1.032161e-01 1.122291e-02
## PC5 PC6 PC8 PC9 PC10
## 1.841450e-01 -2.050225e-02 2.299339e-01 -1.290269e-01 1.537057e-01
## PC11 PC12 PC14 PC15 PC16
## 2.538764e-02 9.754136e-04 1.021301e-01 -1.463007e-01 4.856407e-02
## PC17 PC19 PC20 PC22 PC23
## -2.023011e-02 5.505689e-02 1.631526e-02 -3.492381e-02 3.582623e-02
## PC25 PC26 PC27 PC30 PC33
## 5.592459e-02 -1.171979e-01 -1.663707e-02 6.033494e-02 5.565052e-03
## PC35 PC37 PC40 PC44 PC45
## -1.172498e-02 -1.546394e-04 3.604452e-02 -1.252180e-02 -3.095379e-02
## PC46 PC47 PC49 PC51 PC52
## 1.681475e-03 1.724115e-02 9.276713e-03 -6.135104e-03 5.046961e-02
## PC54 PC57 PC68 PC70 PC74
## -1.473521e-02 -7.293284e-02 -6.316243e-02 1.853891e-02 1.453370e-02
## PC75 PC77 PC84 PC85 PC87
## -4.512549e-03 -2.247159e-02 1.082054e-02 -1.366731e-02 1.550367e-02
## PC88 PC92 PC95 PC99 PC100
## -5.882902e-02 1.630587e-02 -1.634642e-02 -2.778493e-03 3.531273e-02
## PC101 PC102 PC103 PC106 PC108
## 3.103369e-02 -9.798514e-03 7.093678e-03 1.739078e-02 1.708633e-02
## PC109 PC111 PC113 PC114 PC117
## 1.332506e-02 -1.587741e-02 -8.588369e-03 -3.991125e-02 1.557804e-02
## PC118 PC120 PC123 PC124 PC126
## 1.348239e-02 -6.059837e-05 3.546495e-03 -5.299155e-02 3.228563e-02
## PC128 PC130 PC133 PC137 PC138
## 5.807717e-02 7.577972e-03 6.531028e-04 5.630985e-04 3.321090e-02
## PC140 PC142 PC144
## 1.493142e-02 -4.296013e-02 1.625377e-02
## [1] "myfit_mdl: train diagnostics complete: 76.797000 secs"
## Prediction
## Reference D R
## D 1638 722
## R 763 1330
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.665170e-01 3.298849e-01 6.524516e-01 6.803636e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 2.095908e-76 2.992707e-01
## Prediction
## Reference D R
## D 379 212
## R 253 271
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 0.5829596413 0.1591674627 0.5533824799 0.6120978996 0.5300448430
## AccuracyPValue McnemarPValue
## 0.0002157073 0.0636025696
## [1] "myfit_mdl: predict complete: 92.146000 secs"
## id
## 1 RFE.X#zv.pca#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 75.364 1.866
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6647597 0.6940678 0.6354515 0.7353638
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.641737 0.6459313
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6524516 0.6803636 0.2875399
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.5792308 0.641286 0.5171756 0.581651
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.5 0.5382324 0.5829596
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5533825 0.6120979 0.1591675
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.006586809 0.01412354
## [1] "myfit_mdl: exit: 92.161000 secs"
## [1] "\nmyfit_mdl: enter: 0.000000 secs"
## [1] "fitting model: RFE.X#ica#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.768000 secs"
## Warning in preProcess.default(method = "ica", n.comp = 3, x =
## structure(c(0.231455024943138, : These variables have zero variances:
## YOB.Age.fctrNA:YOB.Age.dff
## + Fold1.Rep1: alpha=0.100, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep1: alpha=0.100, lambda=0.02637
## + Fold1.Rep1: alpha=0.325, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep1: alpha=0.325, lambda=0.02637
## + Fold1.Rep1: alpha=0.550, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep1: alpha=0.550, lambda=0.02637
## + Fold1.Rep1: alpha=0.775, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep1: alpha=0.775, lambda=0.02637
## + Fold1.Rep1: alpha=1.000, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep1: alpha=1.000, lambda=0.02637
## + Fold2.Rep1: alpha=0.100, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep1: alpha=0.100, lambda=0.02637
## + Fold2.Rep1: alpha=0.325, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep1: alpha=0.325, lambda=0.02637
## + Fold2.Rep1: alpha=0.550, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep1: alpha=0.550, lambda=0.02637
## + Fold2.Rep1: alpha=0.775, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep1: alpha=0.775, lambda=0.02637
## + Fold2.Rep1: alpha=1.000, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep1: alpha=1.000, lambda=0.02637
## + Fold3.Rep1: alpha=0.100, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep1: alpha=0.100, lambda=0.02637
## + Fold3.Rep1: alpha=0.325, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep1: alpha=0.325, lambda=0.02637
## + Fold3.Rep1: alpha=0.550, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep1: alpha=0.550, lambda=0.02637
## + Fold3.Rep1: alpha=0.775, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep1: alpha=0.775, lambda=0.02637
## + Fold3.Rep1: alpha=1.000, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep1: alpha=1.000, lambda=0.02637
## + Fold1.Rep2: alpha=0.100, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep2: alpha=0.100, lambda=0.02637
## + Fold1.Rep2: alpha=0.325, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep2: alpha=0.325, lambda=0.02637
## + Fold1.Rep2: alpha=0.550, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep2: alpha=0.550, lambda=0.02637
## + Fold1.Rep2: alpha=0.775, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep2: alpha=0.775, lambda=0.02637
## + Fold1.Rep2: alpha=1.000, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep2: alpha=1.000, lambda=0.02637
## + Fold2.Rep2: alpha=0.100, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep2: alpha=0.100, lambda=0.02637
## + Fold2.Rep2: alpha=0.325, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep2: alpha=0.325, lambda=0.02637
## + Fold2.Rep2: alpha=0.550, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep2: alpha=0.550, lambda=0.02637
## + Fold2.Rep2: alpha=0.775, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep2: alpha=0.775, lambda=0.02637
## + Fold2.Rep2: alpha=1.000, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep2: alpha=1.000, lambda=0.02637
## + Fold3.Rep2: alpha=0.100, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep2: alpha=0.100, lambda=0.02637
## + Fold3.Rep2: alpha=0.325, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep2: alpha=0.325, lambda=0.02637
## + Fold3.Rep2: alpha=0.550, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep2: alpha=0.550, lambda=0.02637
## + Fold3.Rep2: alpha=0.775, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep2: alpha=0.775, lambda=0.02637
## + Fold3.Rep2: alpha=1.000, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep2: alpha=1.000, lambda=0.02637
## + Fold1.Rep3: alpha=0.100, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep3: alpha=0.100, lambda=0.02637
## + Fold1.Rep3: alpha=0.325, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep3: alpha=0.325, lambda=0.02637
## + Fold1.Rep3: alpha=0.550, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep3: alpha=0.550, lambda=0.02637
## + Fold1.Rep3: alpha=0.775, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep3: alpha=0.775, lambda=0.02637
## + Fold1.Rep3: alpha=1.000, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold1.Rep3: alpha=1.000, lambda=0.02637
## + Fold2.Rep3: alpha=0.100, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep3: alpha=0.100, lambda=0.02637
## + Fold2.Rep3: alpha=0.325, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep3: alpha=0.325, lambda=0.02637
## + Fold2.Rep3: alpha=0.550, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep3: alpha=0.550, lambda=0.02637
## + Fold2.Rep3: alpha=0.775, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep3: alpha=0.775, lambda=0.02637
## + Fold2.Rep3: alpha=1.000, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold2.Rep3: alpha=1.000, lambda=0.02637
## + Fold3.Rep3: alpha=0.100, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep3: alpha=0.100, lambda=0.02637
## + Fold3.Rep3: alpha=0.325, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep3: alpha=0.325, lambda=0.02637
## + Fold3.Rep3: alpha=0.550, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep3: alpha=0.550, lambda=0.02637
## + Fold3.Rep3: alpha=0.775, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep3: alpha=0.775, lambda=0.02637
## + Fold3.Rep3: alpha=1.000, lambda=0.02637
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## - Fold3.Rep3: alpha=1.000, lambda=0.02637
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 1, lambda = 0.00568 on full training set
## Warning in preProcess.default(thresh = 0.95, k = 5, method = "ica", n.comp
## = 3, : These variables have zero variances: YOB.Age.fctrNA:YOB.Age.dff
## [1] "myfit_mdl: train complete: 40.790000 secs"
## Warning in myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst
## = list(id.prefix = mdlFamily, : model's bestTune found at an extreme of
## tuneGrid for parameter: alpha
## Length Class Mode
## a0 37 -none- numeric
## beta 111 dgCMatrix S4
## df 37 -none- numeric
## dim 2 -none- numeric
## lambda 37 -none- numeric
## dev.ratio 37 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 3 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) ICA1 ICA2 ICA3
## -0.121675989 0.008689276 -0.067729137 0.225195739
## [1] "max lambda < lambdaOpt:"
## (Intercept) ICA1 ICA2 ICA3
## -0.12169648 0.01082515 -0.06990453 0.22742670
## [1] "myfit_mdl: train diagnostics complete: 41.391000 secs"
## Prediction
## Reference D R
## D 1824 536
## R 1411 682
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.627667e-01 1.011208e-01 5.480478e-01 5.774032e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 6.054861e-06 2.567889e-87
## Prediction
## Reference D R
## D 553 38
## R 479 45
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.363229e-01 2.266111e-02 5.065406e-01 5.659130e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 3.484571e-01 1.992366e-83
## [1] "myfit_mdl: predict complete: 57.247000 secs"
## id
## 1 RFE.X#ica#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 15 39.908 0.933
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.5493647 0.7728814 0.3258481 0.5747214
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.4119601 0.5603719
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.5480478 0.5774032 0.09557091
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.5121737 0.7648054 0.259542 0.5370894
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.1482702 0.5363229
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5065406 0.565913 0.02266111
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.007850957 0.01457805
## [1] "myfit_mdl: exit: 57.262000 secs"
## [1] "\nmyfit_mdl: enter: 0.000000 secs"
## [1] "fitting model: RFE.X#spatialSign#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.667000 secs"
## Warning in preProcess.default(method = "spatialSign", x =
## structure(c(0.231455024943138, : These variables have zero variances:
## YOB.Age.fctrNA:YOB.Age.dff
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.0137 on full training set
## Warning in preProcess.default(thresh = 0.95, k = 5, method
## = "spatialSign", : These variables have zero variances:
## YOB.Age.fctrNA:YOB.Age.dff
## [1] "myfit_mdl: train complete: 47.476000 secs"
## Length Class Mode
## a0 82 -none- numeric
## beta 20008 dgCMatrix S4
## df 82 -none- numeric
## dim 2 -none- numeric
## lambda 82 -none- numeric
## dev.ratio 82 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.17205234 0.85636651
## Hhold.fctrMKy Hhold.fctrPKn
## 0.28191667 -1.27122403
## Income.fctr.Q Income.fctr.C
## 0.29512031 0.21507818
## Q100689.fctrYes Q101163.fctrDad
## -0.50271287 1.11353944
## Q101596.fctrYes Q102089.fctrRent
## 0.34912464 -0.13212438
## Q105840.fctrNo Q106042.fctrNo
## 0.09208609 0.18547090
## Q106272.fctrYes Q106388.fctrYes
## 0.13875787 0.14610136
## Q106389.fctrNo Q106997.fctrGr
## 0.08835344 0.49670025
## Q108855.fctrYes! Q109244.fctrNo
## 0.20760598 3.28410974
## Q109244.fctrYes Q110740.fctrPC
## -7.88005376 0.50329349
## Q112478.fctrNo Q113181.fctrNo
## 0.09400750 -0.67780481
## Q113181.fctrYes Q113583.fctrTunes
## 1.39299467 -0.02880769
## Q115195.fctrYes Q115611.fctrNo
## -0.24782454 -1.04155614
## Q115611.fctrYes Q115899.fctrCs
## 1.70901277 -0.72102103
## Q116881.fctrRight Q116953.fctrNo
## 0.57547691 0.22726167
## Q118232.fctrId Q119851.fctrNo
## -0.06167799 0.87351255
## Q119851.fctrYes Q120379.fctrYes
## -0.04676439 -0.83497860
## Q120472.fctrScience Q120650.fctrYes
## 0.42461854 0.44274463
## Q122771.fctrPt Q96024.fctrNo
## 0.52615401 -0.17915691
## Q98197.fctrNo Q98197.fctrYes
## -2.40782237 0.37242406
## Q98869.fctrNo Q99480.fctrNo
## -0.36437749 -0.39721089
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -1.54321800 -0.17042120
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.17363679 0.85292189
## Hhold.fctrMKy Hhold.fctrPKn
## 0.32496505 -1.32603561
## Income.fctr.Q Income.fctr.C
## 0.35172471 0.30212664
## Q100689.fctrYes Q101163.fctrDad
## -0.61307138 1.17123508
## Q101596.fctrYes Q102089.fctrRent
## 0.39977472 -0.18342039
## Q104996.fctrNo Q105840.fctrNo
## 0.07886642 0.10091739
## Q106042.fctrNo Q106272.fctrYes
## 0.22854495 0.15767496
## Q106388.fctrYes Q106389.fctrNo
## 0.17065069 0.15042031
## Q106997.fctrGr Q108342.fctrOnline
## 0.58975817 -0.02136966
## Q108855.fctrYes! Q109244.fctrNo
## 0.27282570 3.29977094
## Q109244.fctrYes Q110740.fctrMac
## -7.90317655 -0.02253649
## Q110740.fctrPC Q112478.fctrNo
## 0.54322037 0.16204079
## Q113181.fctrNo Q113181.fctrYes
## -0.71752474 1.41643102
## Q113583.fctrTunes Q115195.fctrYes
## -0.10977619 -0.32857515
## Q115611.fctrNo Q115611.fctrYes
## -1.01305157 1.74836686
## Q115899.fctrCs Q116881.fctrHappy
## -0.79711564 -0.05681566
## Q116881.fctrRight Q116953.fctrNo
## 0.60722794 0.31510621
## Q118232.fctrId Q119851.fctrNo
## -0.13075544 0.90308083
## Q119851.fctrYes Q120379.fctrYes
## -0.10366027 -0.93603427
## Q120472.fctrScience Q120650.fctrYes
## 0.47935799 0.53933266
## Q121699.fctrYes Q122120.fctrYes
## -0.08483080 0.05840016
## Q122770.fctrYes Q122771.fctrPt
## 0.04267601 0.59045559
## Q124742.fctrNo Q96024.fctrNo
## -0.06957517 -0.24090168
## Q98197.fctrNo Q98197.fctrYes
## -2.45544172 0.38181653
## Q98869.fctrNo Q99480.fctrNo
## -0.42689524 -0.45803712
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -1.66376007 -0.24217677
## [1] "myfit_mdl: train diagnostics complete: 48.182000 secs"
## Prediction
## Reference D R
## D 1645 715
## R 779 1314
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.644958e-01 3.254037e-01 6.504110e-01 6.783646e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 3.511103e-74 1.031192e-01
## Prediction
## Reference D R
## D 499 92
## R 376 148
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.802691e-01 1.307926e-01 5.506729e-01 6.094405e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 4.206226e-04 4.190764e-39
## [1] "myfit_mdl: predict complete: 65.112000 secs"
## id
## 1 RFE.X#spatialSign#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 46.699 3.457
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6624204 0.6970339 0.627807 0.7332314
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6375546 0.6490772
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.650411 0.6783646 0.2956297
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.5570372 0.5854484 0.528626 0.5794035
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.6 0.3874346 0.5802691
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5506729 0.6094405 0.1307926
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.007815112 0.01678342
## [1] "myfit_mdl: exit: 65.126000 secs"
## [1] "\nmyfit_mdl: enter: 0.000000 secs"
## [1] "fitting model: RFE.X#conditionalX#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.698000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.775, lambda = 0.014 on full training set
## [1] "myfit_mdl: train complete: 23.837000 secs"
## Length Class Mode
## a0 83 -none- numeric
## beta 20252 dgCMatrix S4
## df 83 -none- numeric
## dim 2 -none- numeric
## lambda 83 -none- numeric
## dev.ratio 83 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 244 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.231235208 0.105996862
## Hhold.fctrMKy Hhold.fctrPKn
## 0.037530839 -0.462338411
## Income.fctr.Q Income.fctr.C
## 0.050511902 0.018998965
## Q100689.fctrYes Q101163.fctrDad
## -0.055283639 0.146113017
## Q101596.fctrYes Q102089.fctrRent
## 0.036618639 -0.015340306
## Q106042.fctrNo Q106272.fctrYes
## 0.011463411 0.009424122
## Q106388.fctrYes Q106997.fctrGr
## 0.026714803 0.075133557
## Q108855.fctrYes! Q109244.fctrNo
## 0.029034122 0.424732820
## Q109244.fctrYes Q110740.fctrPC
## -1.290091615 0.083252496
## Q112478.fctrNo Q113181.fctrNo
## 0.010843412 -0.088149365
## Q113181.fctrYes Q115195.fctrYes
## 0.187631356 -0.026839083
## Q115611.fctrNo Q115611.fctrYes
## -0.142804586 0.238183824
## Q115899.fctrCs Q116881.fctrHappy
## -0.090071561 -0.008298821
## Q116881.fctrRight Q116953.fctrNo
## 0.093162156 0.028952204
## Q118232.fctrId Q119851.fctrNo
## -0.016361288 0.100215288
## Q120379.fctrYes Q120472.fctrScience
## -0.104208571 0.057685089
## Q120650.fctrYes Q122771.fctrPt
## 0.046857175 0.073870604
## Q96024.fctrNo Q98197.fctrNo
## -0.015142098 -0.317900131
## Q98197.fctrYes Q98869.fctrNo
## 0.019623012 -0.054425151
## Q99480.fctrNo Q109244.fctrYes:.clusterid.fctr3
## -0.060237559 -0.340923455
## YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.013105017
## [1] "max lambda < lambdaOpt:"
## (Intercept) Gender.fctrM
## -0.2330609616 0.1054981329
## Hhold.fctrMKy Hhold.fctrPKn
## 0.0441815228 -0.4832355082
## Income.fctr.Q Income.fctr.C
## 0.0602852373 0.0347677155
## Q100689.fctrYes Q101163.fctrDad
## -0.0683272189 0.1533257769
## Q101596.fctrYes Q102089.fctrRent
## 0.0439390076 -0.0239022190
## Q104996.fctrNo Q106042.fctrNo
## 0.0043630800 0.0181892131
## Q106272.fctrYes Q106388.fctrYes
## 0.0133561866 0.0322154731
## Q106389.fctrNo Q106997.fctrGr
## 0.0034398840 0.0883487716
## Q108342.fctrOnline Q108855.fctrYes!
## -0.0024951688 0.0384230419
## Q109244.fctrNo Q109244.fctrYes
## 0.4252674971 -1.2944252294
## Q110740.fctrPC Q112478.fctrNo
## 0.0904838371 0.0206308499
## Q113181.fctrNo Q113181.fctrYes
## -0.0974065367 0.1868282743
## Q113583.fctrTunes Q115195.fctrYes
## -0.0004141873 -0.0375439703
## Q115611.fctrNo Q115611.fctrYes
## -0.1393412913 0.2431770094
## Q115899.fctrCs Q116881.fctrHappy
## -0.1011804925 -0.0184386866
## Q116881.fctrRight Q116953.fctrNo
## 0.0961084981 0.0426058122
## Q118232.fctrId Q119851.fctrNo
## -0.0266978568 0.1074911511
## Q119851.fctrYes Q120379.fctrYes
## -0.0033132601 -0.1185959917
## Q120472.fctrScience Q120650.fctrYes
## 0.0652028941 0.0591120125
## Q121699.fctrYes Q122120.fctrYes
## -0.0080339783 0.0008435008
## Q122771.fctrPt Q124742.fctrNo
## 0.0876713081 -0.0112811758
## Q96024.fctrNo Q98197.fctrNo
## -0.0246782767 -0.3250116396
## Q98197.fctrYes Q98869.fctrNo
## 0.0194484440 -0.0664120602
## Q99480.fctrNo Q99480.fctrYes
## -0.0685669208 0.0052925176
## Q109244.fctrYes:.clusterid.fctr3 YOB.Age.fctr(35,40]:YOB.Age.dff
## -0.3783124405 -0.0181184935
## [1] "myfit_mdl: train diagnostics complete: 24.507000 secs"
## Prediction
## Reference D R
## D 1671 689
## R 807 1286
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.640467e-01 3.235116e-01 6.499576e-01 6.779203e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 1.083627e-73 2.486636e-03
## Prediction
## Reference D R
## D 440 151
## R 321 203
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.766816e-01 1.343766e-01 5.470616e-01 6.058959e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 9.762675e-04 7.318358e-15
## [1] "myfit_mdl: predict complete: 39.033000 secs"
## id
## 1 RFE.X#conditionalX#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 23.022 2.099
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6612399 0.7080508 0.614429 0.7306715
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6322517 0.6475052
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6499576 0.6779203 0.2914606
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.558818 0.6023689 0.5152672 0.5757966
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4624146 0.5766816
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5470616 0.6058959 0.1343766
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.008383749 0.01784651
## [1] "myfit_mdl: exit: 39.048000 secs"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#nzv.spatialSign#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.679000 secs"
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.1, lambda = 0.0635 on full training set
## [1] "myfit_mdl: train complete: 52.583000 secs"
## Warning in myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst
## = list(id.prefix = mdlFamily, : model's bestTune found at an extreme of
## tuneGrid for parameter: alpha
## Warning in myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst
## = list(id.prefix = mdlFamily, : model's bestTune found at an extreme of
## tuneGrid for parameter: lambda
## Length Class Mode
## a0 89 -none- numeric
## beta 20559 dgCMatrix S4
## df 89 -none- numeric
## dim 2 -none- numeric
## lambda 89 -none- numeric
## dev.ratio 89 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 231 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Edn.fctr.L
## -0.147701643 -0.063484422
## Edn.fctr.C Edn.fctr^7
## 0.064127902 -0.130140129
## Gender.fctrF Gender.fctrM
## -0.363398451 0.626219171
## Hhold.fctrMKy Income.fctr.Q
## 0.597814545 0.481499439
## Income.fctr.C Income.fctr^4
## 0.442311310 0.021054634
## Q100689.fctrYes Q101162.fctrPessimist
## -0.652686288 0.102372630
## Q101163.fctrDad Q101163.fctrMom
## 0.913005817 -0.244763641
## Q101596.fctrYes Q102089.fctrRent
## 0.424868105 -0.229221806
## Q104996.fctrNo Q104996.fctrYes
## 0.179085690 -0.034624904
## Q105840.fctrNo Q105840.fctrYes
## 0.290803422 -0.015452613
## Q106042.fctrNo Q106272.fctrYes
## 0.368843662 0.228696124
## Q106388.fctrYes Q106389.fctrNo
## 0.269265359 0.317057370
## Q106993.fctrNo Q106997.fctrGr
## 0.005094682 0.411402729
## Q106997.fctrYy Q108342.fctrOnline
## -0.294542712 -0.249670650
## Q108855.fctrYes! Q109244.fctrNo
## 0.295728471 3.141030261
## Q109244.fctrYes Q109367.fctrYes
## -5.864240821 -0.175917088
## Q110740.fctrMac Q110740.fctrPC
## -0.199662732 0.503723763
## Q111848.fctrYes Q112270.fctrNo
## -0.252305478 -0.151759435
## Q112478.fctrNo Q112478.fctrYes
## 0.287108395 -0.040939601
## Q113181.fctrNo Q113181.fctrYes
## -0.753918348 1.071374317
## Q113583.fctrTunes Q114517.fctrNo
## -0.269605680 -0.019594695
## Q115195.fctrNo Q115195.fctrYes
## 0.099499705 -0.422988300
## Q115390.fctrNo Q115390.fctrYes
## 0.076473492 -0.182409073
## Q115610.fctrNo Q115611.fctrNo
## 0.025358405 -1.134970657
## Q115611.fctrYes Q115899.fctrCs
## 1.608621317 -0.607965360
## Q115899.fctrMe Q116601.fctrYes
## 0.359849187 -0.262408744
## Q116797.fctrNo Q116881.fctrHappy
## 0.048648344 -0.279675996
## Q116881.fctrRight Q116953.fctrNo
## 0.553381859 0.435007341
## Q116953.fctrYes Q117186.fctrHot headed
## -0.032166975 0.200200275
## Q117193.fctrStandard hours Q118232.fctrId
## 0.041835328 -0.386937377
## Q118233.fctrNo Q118892.fctrYes
## 0.242249806 -0.217367353
## Q119851.fctrNo Q119851.fctrYes
## 0.739188280 -0.354320459
## Q120012.fctrYes Q120014.fctrYes
## -0.001587870 0.078797517
## Q120194.fctrStudy first Q120379.fctrNo
## -0.238948261 0.397334251
## Q120379.fctrYes Q120472.fctrScience
## -0.724786571 0.502543651
## Q120650.fctrNo Q120650.fctrYes
## -0.190142673 0.453962074
## Q121699.fctrNo Q121699.fctrYes
## 0.068874939 -0.315655774
## Q122120.fctrYes Q122770.fctrYes
## 0.192932366 0.269591772
## Q122771.fctrPt Q123621.fctrYes
## 0.565157138 0.021184306
## Q124122.fctrNo Q124122.fctrYes
## 0.040851637 -0.125675143
## Q124742.fctrNo Q96024.fctrNo
## -0.281912101 -0.516937589
## Q98078.fctrYes Q98197.fctrNo
## -0.261408179 -1.722495895
## Q98197.fctrYes Q98869.fctrNo
## 0.690715298 -0.706232079
## Q99480.fctrNo Q99480.fctrYes
## -0.580072367 0.182199885
## YOB.Age.fctr.L Q109244.fctrNo:.clusterid.fctr3
## -0.157624790 0.411035418
## [1] "max lambda < lambdaOpt:"
## (Intercept) Edn.fctr.L
## -0.14974469 -0.07693978
## Edn.fctr.C Edn.fctr^7
## 0.08532721 -0.15403577
## Gender.fctrF Gender.fctrM
## -0.34154777 0.63409500
## Hhold.fctrMKy Income.fctr.Q
## 0.63139279 0.52434097
## Income.fctr.C Income.fctr^4
## 0.49710724 0.05863648
## Q100689.fctrYes Q101162.fctrPessimist
## -0.71491687 0.12727120
## Q101163.fctrDad Q101163.fctrMom
## 0.95570277 -0.23630963
## Q101596.fctrYes Q102089.fctrRent
## 0.45842084 -0.24876687
## Q104996.fctrNo Q104996.fctrYes
## 0.20516204 -0.06822720
## Q105655.fctrYes Q105840.fctrNo
## 0.02190865 0.29193698
## Q105840.fctrYes Q106042.fctrNo
## -0.02172878 0.38072333
## Q106272.fctrYes Q106388.fctrYes
## 0.25435780 0.28898785
## Q106389.fctrNo Q106993.fctrNo
## 0.36261045 0.06355940
## Q106997.fctrGr Q106997.fctrYy
## 0.42787557 -0.34002131
## Q108342.fctrOnline Q108855.fctrYes!
## -0.28257496 0.34356117
## Q108950.fctrRisk-friendly Q109244.fctrNo
## -0.01859759 3.19537262
## Q109244.fctrYes Q109367.fctrYes
## -5.99605910 -0.20171988
## Q110740.fctrMac Q110740.fctrPC
## -0.21452060 0.54284780
## Q111848.fctrYes Q112270.fctrNo
## -0.29302684 -0.18696637
## Q112478.fctrNo Q112478.fctrYes
## 0.31965714 -0.05130035
## Q113181.fctrNo Q113181.fctrYes
## -0.76000851 1.10438538
## Q113583.fctrTunes Q114517.fctrNo
## -0.31066971 -0.06368687
## Q115195.fctrNo Q115195.fctrYes
## 0.11771538 -0.44981377
## Q115390.fctrNo Q115390.fctrYes
## 0.10746775 -0.20383258
## Q115610.fctrNo Q115611.fctrNo
## 0.06203548 -1.14171359
## Q115611.fctrYes Q115899.fctrCs
## 1.64350041 -0.63692457
## Q115899.fctrMe Q116601.fctrYes
## 0.38611981 -0.31377446
## Q116797.fctrNo Q116881.fctrHappy
## 0.09018503 -0.31841140
## Q116881.fctrRight Q116953.fctrNo
## 0.56802546 0.46563236
## Q116953.fctrYes Q117186.fctrHot headed
## -0.07275839 0.23673166
## Q117193.fctrStandard hours Q118232.fctrId
## 0.08234152 -0.43124865
## Q118233.fctrNo Q118892.fctrYes
## 0.30162147 -0.24365182
## Q119650.fctrReceiving Q119851.fctrNo
## -0.02160362 0.77687374
## Q119851.fctrYes Q120012.fctrYes
## -0.37021537 -0.03564554
## Q120014.fctrYes Q120194.fctrStudy first
## 0.10933127 -0.27988257
## Q120379.fctrNo Q120379.fctrYes
## 0.40132103 -0.77694569
## Q120472.fctrScience Q120650.fctrNo
## 0.53675394 -0.21035245
## Q120650.fctrYes Q121699.fctrNo
## 0.50395600 0.05875255
## Q121699.fctrYes Q122120.fctrYes
## -0.36990230 0.23025134
## Q122770.fctrYes Q122771.fctrPt
## 0.31396010 0.60431835
## Q123621.fctrYes Q124122.fctrNo
## 0.05675862 0.06623947
## Q124122.fctrYes Q124742.fctrNo
## -0.15871397 -0.34028217
## Q96024.fctrNo Q98078.fctrYes
## -0.55943083 -0.27150021
## Q98197.fctrNo Q98197.fctrYes
## -1.78491965 0.69342602
## Q98869.fctrNo Q99480.fctrNo
## -0.74507595 -0.59986570
## Q99480.fctrYes YOB.Age.fctr.L
## 0.22667115 -0.20066167
## YOB.Age.fctr.Q YOB.Age.fctr^8
## -0.04266743 0.03186768
## Q109244.fctrNo:.clusterid.fctr3
## 0.41835138
## [1] "myfit_mdl: train diagnostics complete: 53.285000 secs"
## Prediction
## Reference D R
## D 1682 678
## R 780 1313
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.725803e-01 3.409811e-01 6.585751e-01 6.863588e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 2.729365e-83 8.166602e-03
## Prediction
## Reference D R
## D 512 79
## R 388 136
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.811659e-01 1.302231e-01 5.515760e-01 6.103264e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 3.378502e-04 4.322666e-46
## [1] "myfit_mdl: predict complete: 70.207000 secs"
## id
## 1 RFE.X#nzv.spatialSign#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 51.794 4.844
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6700205 0.7127119 0.6273292 0.7402374
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6429971 0.6462317
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6585751 0.6863588 0.2886201
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.5597528 0.6175973 0.5019084 0.5785672
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.6 0.368065 0.5811659
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.551576 0.6103264 0.1302231
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.007818819 0.01653175
## [1] "myfit_mdl: exit: 70.222000 secs"
## [1] "\nmyfit_mdl: enter: 0.001000 secs"
## [1] "fitting model: RFE.X#nzv.pca.spatialSign#rcv#glmnet"
## [1] " indepVar: Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr"
## [1] "myfit_mdl: setup complete: 0.694000 secs"
## + Fold1.Rep1: alpha=0.100, lambda=0.06346
## - Fold1.Rep1: alpha=0.100, lambda=0.06346
## + Fold1.Rep1: alpha=0.325, lambda=0.06346
## - Fold1.Rep1: alpha=0.325, lambda=0.06346
## + Fold1.Rep1: alpha=0.550, lambda=0.06346
## - Fold1.Rep1: alpha=0.550, lambda=0.06346
## + Fold1.Rep1: alpha=0.775, lambda=0.06346
## - Fold1.Rep1: alpha=0.775, lambda=0.06346
## + Fold1.Rep1: alpha=1.000, lambda=0.06346
## - Fold1.Rep1: alpha=1.000, lambda=0.06346
## + Fold2.Rep1: alpha=0.100, lambda=0.06346
## - Fold2.Rep1: alpha=0.100, lambda=0.06346
## + Fold2.Rep1: alpha=0.325, lambda=0.06346
## - Fold2.Rep1: alpha=0.325, lambda=0.06346
## + Fold2.Rep1: alpha=0.550, lambda=0.06346
## - Fold2.Rep1: alpha=0.550, lambda=0.06346
## + Fold2.Rep1: alpha=0.775, lambda=0.06346
## - Fold2.Rep1: alpha=0.775, lambda=0.06346
## + Fold2.Rep1: alpha=1.000, lambda=0.06346
## - Fold2.Rep1: alpha=1.000, lambda=0.06346
## + Fold3.Rep1: alpha=0.100, lambda=0.06346
## - Fold3.Rep1: alpha=0.100, lambda=0.06346
## + Fold3.Rep1: alpha=0.325, lambda=0.06346
## - Fold3.Rep1: alpha=0.325, lambda=0.06346
## + Fold3.Rep1: alpha=0.550, lambda=0.06346
## - Fold3.Rep1: alpha=0.550, lambda=0.06346
## + Fold3.Rep1: alpha=0.775, lambda=0.06346
## - Fold3.Rep1: alpha=0.775, lambda=0.06346
## + Fold3.Rep1: alpha=1.000, lambda=0.06346
## - Fold3.Rep1: alpha=1.000, lambda=0.06346
## + Fold1.Rep2: alpha=0.100, lambda=0.06346
## - Fold1.Rep2: alpha=0.100, lambda=0.06346
## + Fold1.Rep2: alpha=0.325, lambda=0.06346
## - Fold1.Rep2: alpha=0.325, lambda=0.06346
## + Fold1.Rep2: alpha=0.550, lambda=0.06346
## - Fold1.Rep2: alpha=0.550, lambda=0.06346
## + Fold1.Rep2: alpha=0.775, lambda=0.06346
## - Fold1.Rep2: alpha=0.775, lambda=0.06346
## + Fold1.Rep2: alpha=1.000, lambda=0.06346
## - Fold1.Rep2: alpha=1.000, lambda=0.06346
## + Fold2.Rep2: alpha=0.100, lambda=0.06346
## - Fold2.Rep2: alpha=0.100, lambda=0.06346
## + Fold2.Rep2: alpha=0.325, lambda=0.06346
## - Fold2.Rep2: alpha=0.325, lambda=0.06346
## + Fold2.Rep2: alpha=0.550, lambda=0.06346
## - Fold2.Rep2: alpha=0.550, lambda=0.06346
## + Fold2.Rep2: alpha=0.775, lambda=0.06346
## - Fold2.Rep2: alpha=0.775, lambda=0.06346
## + Fold2.Rep2: alpha=1.000, lambda=0.06346
## - Fold2.Rep2: alpha=1.000, lambda=0.06346
## + Fold3.Rep2: alpha=0.100, lambda=0.06346
## - Fold3.Rep2: alpha=0.100, lambda=0.06346
## + Fold3.Rep2: alpha=0.325, lambda=0.06346
## - Fold3.Rep2: alpha=0.325, lambda=0.06346
## + Fold3.Rep2: alpha=0.550, lambda=0.06346
## - Fold3.Rep2: alpha=0.550, lambda=0.06346
## + Fold3.Rep2: alpha=0.775, lambda=0.06346
## - Fold3.Rep2: alpha=0.775, lambda=0.06346
## + Fold3.Rep2: alpha=1.000, lambda=0.06346
## - Fold3.Rep2: alpha=1.000, lambda=0.06346
## + Fold1.Rep3: alpha=0.100, lambda=0.06346
## - Fold1.Rep3: alpha=0.100, lambda=0.06346
## + Fold1.Rep3: alpha=0.325, lambda=0.06346
## - Fold1.Rep3: alpha=0.325, lambda=0.06346
## + Fold1.Rep3: alpha=0.550, lambda=0.06346
## - Fold1.Rep3: alpha=0.550, lambda=0.06346
## + Fold1.Rep3: alpha=0.775, lambda=0.06346
## - Fold1.Rep3: alpha=0.775, lambda=0.06346
## + Fold1.Rep3: alpha=1.000, lambda=0.06346
## - Fold1.Rep3: alpha=1.000, lambda=0.06346
## + Fold2.Rep3: alpha=0.100, lambda=0.06346
## - Fold2.Rep3: alpha=0.100, lambda=0.06346
## + Fold2.Rep3: alpha=0.325, lambda=0.06346
## - Fold2.Rep3: alpha=0.325, lambda=0.06346
## + Fold2.Rep3: alpha=0.550, lambda=0.06346
## - Fold2.Rep3: alpha=0.550, lambda=0.06346
## + Fold2.Rep3: alpha=0.775, lambda=0.06346
## - Fold2.Rep3: alpha=0.775, lambda=0.06346
## + Fold2.Rep3: alpha=1.000, lambda=0.06346
## - Fold2.Rep3: alpha=1.000, lambda=0.06346
## + Fold3.Rep3: alpha=0.100, lambda=0.06346
## - Fold3.Rep3: alpha=0.100, lambda=0.06346
## + Fold3.Rep3: alpha=0.325, lambda=0.06346
## - Fold3.Rep3: alpha=0.325, lambda=0.06346
## + Fold3.Rep3: alpha=0.550, lambda=0.06346
## - Fold3.Rep3: alpha=0.550, lambda=0.06346
## + Fold3.Rep3: alpha=0.775, lambda=0.06346
## - Fold3.Rep3: alpha=0.775, lambda=0.06346
## + Fold3.Rep3: alpha=1.000, lambda=0.06346
## - Fold3.Rep3: alpha=1.000, lambda=0.06346
## Aggregating results
## Selecting tuning parameters
## Fitting alpha = 0.325, lambda = 0.0635 on full training set
## [1] "myfit_mdl: train complete: 534.777000 secs"
## Warning in myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst
## = list(id.prefix = mdlFamily, : model's bestTune found at an extreme of
## tuneGrid for parameter: lambda
## Length Class Mode
## a0 100 -none- numeric
## beta 37100 dgCMatrix S4
## df 100 -none- numeric
## dim 2 -none- numeric
## lambda 100 -none- numeric
## dev.ratio 100 -none- numeric
## nulldev 1 -none- numeric
## npasses 1 -none- numeric
## jerr 1 -none- numeric
## offset 1 -none- logical
## classnames 2 -none- character
## call 5 -none- call
## nobs 1 -none- numeric
## lambdaOpt 1 -none- numeric
## xNames 371 -none- character
## problemType 1 -none- character
## tuneValue 2 data.frame list
## obsLevels 2 -none- character
## [1] "min lambda > lambdaOpt:"
## (Intercept) Hhold.fctrMKy Q101163.fctrDad Q109244.fctrNo
## -0.14290236 0.09165422 0.19944114 2.69454456
## Q109244.fctrYes Q113181.fctrNo Q113181.fctrYes Q115611.fctrNo
## -5.50487462 -0.03889528 0.85247512 -0.42608785
## Q115611.fctrYes Q119851.fctrNo Q98197.fctrNo Q98197.fctrYes
## 1.11343515 0.02568865 -1.12422358 0.38436586
## PC3 PC5 PC8 PC10
## 0.01990749 0.04794195 -0.07559830 0.01548542
## [1] "max lambda < lambdaOpt:"
## (Intercept) Hhold.fctrMKy Q101163.fctrDad Q106388.fctrYes
## -0.144876692 0.141778177 0.289809527 0.058196806
## Q109244.fctrNo Q109244.fctrYes Q113181.fctrNo Q113181.fctrYes
## 2.767107890 -5.646048535 -0.096071242 0.876718463
## Q115611.fctrNo Q115611.fctrYes Q119851.fctrNo Q98197.fctrNo
## -0.497555040 1.131357707 0.116192506 -1.224045530
## Q98197.fctrYes PC3 PC5 PC8
## 0.388285135 0.020911107 0.050838739 -0.077439847
## PC10 PC25
## 0.018012325 0.002235947
## [1] "myfit_mdl: train diagnostics complete: 535.467000 secs"
## Prediction
## Reference D R
## D 1675 685
## R 869 1224
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 6.510218e-01 2.960244e-01 6.368143e-01 6.650309e-01 5.299798e-01
## AccuracyPValue McnemarPValue
## 2.983600e-60 3.446880e-06
## Prediction
## Reference D R
## D 463 128
## R 350 174
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull
## 5.713004e-01 1.183204e-01 5.416475e-01 6.005762e-01 5.300448e-01
## AccuracyPValue McnemarPValue
## 3.115239e-03 5.075491e-24
## [1] "myfit_mdl: predict complete: 552.583000 secs"
## id
## 1 RFE.X#nzv.pca.spatialSign#rcv#glmnet
## feats
## 1 Q109244.fctr,Q115611.fctr,Q113181.fctr,Gender.fctr,Q98197.fctr,Q101163.fctr,Q120379.fctr,Hhold.fctr,Q105840.fctr,Q120472.fctr,Q106272.fctr,Q115899.fctr,Q119851.fctr,Q99480.fctr,Q106042.fctr,Q98869.fctr,Q101596.fctr,Q110740.fctr,Q102089.fctr,Q120014.fctr,Q120650.fctr,Q108855.fctr,Edn.fctr,Q118892.fctr,Q116881.fctr,Q100680.fctr,Q108342.fctr,Q107869.fctr,Q112478.fctr,Q115195.fctr,Q121699.fctr,Q106388.fctr,Q106389.fctr,Q120012.fctr,Q116448.fctr,Q119650.fctr,Q96024.fctr,Q118237.fctr,Income.fctr,Q123621.fctr,Q108617.fctr,Q113583.fctr,Q118232.fctr,Q120194.fctr,Q122770.fctr,Q121700.fctr,Q124122.fctr,Q114152.fctr,Q122771.fctr,Q106997.fctr,Q98078.fctr,Q112270.fctr,Q116953.fctr,Q111848.fctr,Q100689.fctr,Q118233.fctr,Q99982.fctr,Q106993.fctr,Q115390.fctr,Q102906.fctr,Q123464.fctr,Q116797.fctr,Q104996.fctr,Q109367.fctr,Q111220.fctr,Q99716.fctr,Q117186.fctr,Q102674.fctr,Q118117.fctr,Q122769.fctr,Q108754.fctr,Q121011.fctr,Q116441.fctr,YOB.Age.fctr,Q105655.fctr,Q108856.fctr,Q120978.fctr,Q101162.fctr,Q119334.fctr,Q102289.fctr,Q111580.fctr,Q112512.fctr,Q99581.fctr,Q122120.fctr,Q116197.fctr,Q114386.fctr,Q117193.fctr,Q114961.fctr,Q115777.fctr,Q100010.fctr,Q113584.fctr,Q98578.fctr,Q102687.fctr,Q100562.fctr,Q116601.fctr,Q103293.fctr,Q108950.fctr,Q115602.fctr,Q107491.fctr,Q114748.fctr,Q114517.fctr,Q115610.fctr,Q124742.fctr,Q108343.fctr,Q113992.fctr,YOB.Age.fctr:YOB.Age.dff,Q109244.fctr:.clusterid.fctr
## max.nTuningRuns min.elapsedtime.everything min.elapsedtime.final
## 1 25 533.967 15.86
## max.AUCpROC.fit max.Sens.fit max.Spec.fit max.AUCROCR.fit
## 1 0.6472761 0.7097458 0.5848065 0.7185007
## opt.prob.threshold.fit max.f.score.fit max.Accuracy.fit
## 1 0.5 0.6116942 0.6480297
## max.AccuracyLower.fit max.AccuracyUpper.fit max.Kappa.fit
## 1 0.6368143 0.6650309 0.2907066
## max.AUCpROC.OOB max.Sens.OOB max.Spec.OOB max.AUCROCR.OOB
## 1 0.5545298 0.6395939 0.4694656 0.5742305
## opt.prob.threshold.OOB max.f.score.OOB max.Accuracy.OOB
## 1 0.55 0.4213075 0.5713004
## max.AccuracyLower.OOB max.AccuracyUpper.OOB max.Kappa.OOB
## 1 0.5416475 0.6005762 0.1183204
## max.AccuracySD.fit max.KappaSD.fit
## 1 0.007528362 0.01621241
## [1] "myfit_mdl: exit: 552.597000 secs"
## min.elapsedtime.everything
## Random###myrandom_classfr 0.265
## MFO###myMFO_classfr 0.399
## Max.cor.Y.rcv.1X1###glmnet 0.753
## Max.cor.Y##rcv#rpart 1.624
## Interact.High.cor.Y##rcv#glmnet 5.284
## All.X##rcv#glm 14.312
## RFE.X##rcv#glmnet 21.949
## All.X#conditionalX#rcv#glmnet 22.580
## All.X##rcv#glmnet 22.609
## Low.cor.X##rcv#glmnet 22.775
## RFE.X#conditionalX#rcv#glmnet 23.022
## All.X#zv#rcv#glmnet 23.568
## RFE.X#zv#rcv#glmnet 24.269
## RFE.X#scale#rcv#glmnet 25.649
## RFE.X#center#rcv#glmnet 25.755
## All.X#scale#rcv#glmnet 26.279
## All.X#center#rcv#glmnet 26.891
## RFE.X#range#rcv#glmnet 27.116
## RFE.X#BoxCox#rcv#glmnet 28.258
## All.X#range#rcv#glmnet 28.776
## All.X#BoxCox#rcv#glmnet 29.405
## RFE.X#center.scale#rcv#glmnet 29.657
## All.X#center.scale#rcv#glmnet 30.287
## RFE.X#nzv#rcv#glmnet 34.109
## All.X#nzv#rcv#glmnet 36.115
## All.X#spatialSign#rcv#glmnet 36.885
## RFE.X#ica#rcv#glmnet 39.908
## All.X#ica#rcv#glmnet 41.240
## RFE.X#spatialSign#rcv#glmnet 46.699
## RFE.X#nzv.spatialSign#rcv#glmnet 51.794
## All.X#nzv.spatialSign#rcv#glmnet 52.416
## All.X#YeoJohnson#rcv#glmnet 58.542
## All.X.Inc#nzv.spatialSign#rcv#glmnet 67.172
## All.X#expoTrans#rcv#glmnet 70.569
## RFE.X#expoTrans#rcv#glmnet 71.462
## RFE.X#zv.pca#rcv#glmnet 75.364
## All.X#zv.pca#rcv#glmnet 77.239
## RFE.X#YeoJohnson#rcv#glmnet 84.187
## RFE.X#nzv.pca.spatialSign#rcv#glmnet 533.967
## label step_major step_minor label_minor bgn
## 9 fit.models_1_preProc 1 8 preProc 277.140
## 10 fit.models_1_end 1 9 teardown 1653.332
## end elapsed
## 9 1653.332 1376.192
## 10 NA NA
## label step_major step_minor label_minor bgn end
## 1 fit.models_1 1 0 0 9.653 1653.341
## 2 fit.models 1 1 1 1653.342 NA
## elapsed
## 1 1643.688
## 2 NA
fit.models_2_chunk_df <-
myadd_chunk(NULL, "fit.models_2_bgn", label.minor = "setup")
require(reshape2)
plt_models_df <- glb_models_df[, -grep("SD|Upper|Lower", names(glb_models_df))]
for (var in grep("^min.", names(plt_models_df), value=TRUE)) {
plt_models_df[, sub("min.", "inv.", var)] <-
#ifelse(all(is.na(tmp <- plt_models_df[, var])), NA, 1.0 / tmp)
1.0 / plt_models_df[, var]
plt_models_df <- plt_models_df[ , -grep(var, names(plt_models_df))]
}
# print(plt_models_df)
# print(myplot_radar(radar_inp_df=plt_models_df))
# print(myplot_radar(radar_inp_df=subset(plt_models_df,
# !(mdl_id %in% grep("random|MFO", plt_models_df$id, value=TRUE)))))
# Compute CI for <metric>SD
glb_models_df <- mutate(glb_models_df,
max.df = ifelse(max.nTuningRuns > 1, max.nTuningRuns - 1, NA),
min.sd2ci.scaler = ifelse(is.na(max.df), NA, qt(0.975, max.df)))
for (var in grep("SD", names(glb_models_df), value=TRUE)) {
# Does CI alredy exist ?
var_components <- unlist(strsplit(var, "SD"))
varActul <- paste0(var_components[1], var_components[2])
varUpper <- paste0(var_components[1], "Upper", var_components[2])
varLower <- paste0(var_components[1], "Lower", var_components[2])
if (varUpper %in% names(glb_models_df)) {
warning(varUpper, " already exists in glb_models_df")
# Assuming Lower also exists
next
}
print(sprintf("var:%s", var))
# CI is dependent on sample size in t distribution; df=n-1
glb_models_df[, varUpper] <- glb_models_df[, varActul] +
glb_models_df[, "min.sd2ci.scaler"] * glb_models_df[, var]
glb_models_df[, varLower] <- glb_models_df[, varActul] -
glb_models_df[, "min.sd2ci.scaler"] * glb_models_df[, var]
}
# Plot metrics with CI
plt_models_df <- glb_models_df[, "id", FALSE]
pltCI_models_df <- glb_models_df[, "id", FALSE]
for (var in grep("Upper", names(glb_models_df), value=TRUE)) {
var_components <- unlist(strsplit(var, "Upper"))
col_name <- unlist(paste(var_components, collapse=""))
plt_models_df[, col_name] <- glb_models_df[, col_name]
for (name in paste0(var_components[1], c("Upper", "Lower"), var_components[2]))
pltCI_models_df[, name] <- glb_models_df[, name]
}
build_statsCI_data <- function(plt_models_df) {
mltd_models_df <- melt(plt_models_df, id.vars="id")
mltd_models_df$data <- sapply(1:nrow(mltd_models_df),
function(row_ix) tail(unlist(strsplit(as.character(
mltd_models_df[row_ix, "variable"]), "[.]")), 1))
mltd_models_df$label <- sapply(1:nrow(mltd_models_df),
function(row_ix) head(unlist(strsplit(as.character(
mltd_models_df[row_ix, "variable"]),
paste0(".", mltd_models_df[row_ix, "data"]))), 1))
#print(mltd_models_df)
return(mltd_models_df)
}
mltd_models_df <- build_statsCI_data(plt_models_df)
mltdCI_models_df <- melt(pltCI_models_df, id.vars="id")
for (row_ix in 1:nrow(mltdCI_models_df)) {
for (type in c("Upper", "Lower")) {
if (length(var_components <- unlist(strsplit(
as.character(mltdCI_models_df[row_ix, "variable"]), type))) > 1) {
#print(sprintf("row_ix:%d; type:%s; ", row_ix, type))
mltdCI_models_df[row_ix, "label"] <- var_components[1]
mltdCI_models_df[row_ix, "data"] <-
unlist(strsplit(var_components[2], "[.]"))[2]
mltdCI_models_df[row_ix, "type"] <- type
break
}
}
}
wideCI_models_df <- reshape(subset(mltdCI_models_df, select=-variable),
timevar="type",
idvar=setdiff(names(mltdCI_models_df), c("type", "value", "variable")),
direction="wide")
#print(wideCI_models_df)
mrgdCI_models_df <- merge(wideCI_models_df, mltd_models_df, all.x=TRUE)
#print(mrgdCI_models_df)
# Merge stats back in if CIs don't exist
goback_vars <- c()
for (var in unique(mltd_models_df$label)) {
for (type in unique(mltd_models_df$data)) {
var_type <- paste0(var, ".", type)
# if this data is already present, next
if (var_type %in% unique(paste(mltd_models_df$label, mltd_models_df$data,
sep=".")))
next
#print(sprintf("var_type:%s", var_type))
goback_vars <- c(goback_vars, var_type)
}
}
if (length(goback_vars) > 0) {
mltd_goback_df <- build_statsCI_data(glb_models_df[, c("id", goback_vars)])
mltd_models_df <- rbind(mltd_models_df, mltd_goback_df)
}
# mltd_models_df <- merge(mltd_models_df, glb_models_df[, c("id", "model_method")],
# all.x=TRUE)
png(paste0(glbOut$pfx, "models_bar.png"), width=480*3, height=480*2)
#print(gp <- myplot_bar(mltd_models_df, "id", "value", colorcol_name="model_method") +
print(gp <- myplot_bar(df=mltd_models_df, xcol_name="id", ycol_names="value") +
geom_errorbar(data=mrgdCI_models_df,
mapping=aes(x= id, ymax=value.Upper, ymin=value.Lower), width=0.5) +
facet_grid(label ~ data, scales="free") +
theme(axis.text.x = element_text(angle = 90,vjust = 0.5)))
dev.off()
print(gp)
dsp_models_cols <- c("id",
glbMdlMetricsEval[glbMdlMetricsEval %in% names(glb_models_df)],
grep("opt.", names(glb_models_df), fixed = TRUE, value = TRUE))
# if (glb_is_classification && glb_is_binomial)
# dsp_models_cols <- c(dsp_models_cols, "opt.prob.threshold.OOB")
print(dsp_models_df <- orderBy(glbgetModelSelectFormula(), glb_models_df)[, dsp_models_cols])
# print(myplot_radar(radar_inp_df = dsp_models_df))
print("Metrics used for model selection:"); print(glbgetModelSelectFormula())
print(sprintf("Best model id: %s", dsp_models_df[1, "id"]))
glb_get_predictions <- function(df, mdl_id, rsp_var, prob_threshold_def=NULL, verbose=FALSE) {
mdl <- glb_models_lst[[mdl_id]]
clmnNames <- mygetPredictIds(rsp_var, mdl_id)
predct_var_name <- clmnNames$value
predct_prob_var_name <- clmnNames$prob
predct_accurate_var_name <- clmnNames$is.acc
predct_error_var_name <- clmnNames$err
predct_erabs_var_name <- clmnNames$err.abs
if (glb_is_regression) {
df[, predct_var_name] <- predict(mdl, newdata=df, type="raw")
if (verbose) print(myplot_scatter(df, glb_rsp_var, predct_var_name) +
facet_wrap(reformulate(glbFeatsCategory), scales = "free") +
stat_smooth(method="glm"))
df[, predct_error_var_name] <- df[, predct_var_name] - df[, glb_rsp_var]
if (verbose) print(myplot_scatter(df, predct_var_name, predct_error_var_name) +
#facet_wrap(reformulate(glbFeatsCategory), scales = "free") +
stat_smooth(method="auto"))
if (verbose) print(myplot_scatter(df, glb_rsp_var, predct_error_var_name) +
#facet_wrap(reformulate(glbFeatsCategory), scales = "free") +
stat_smooth(method="glm"))
df[, predct_erabs_var_name] <- abs(df[, predct_error_var_name])
if (verbose) print(head(orderBy(reformulate(c("-", predct_erabs_var_name)), df)))
df[, predct_accurate_var_name] <- (df[, glb_rsp_var] == df[, predct_var_name])
}
if (glb_is_classification && glb_is_binomial) {
prob_threshold <- glb_models_df[glb_models_df$id == mdl_id,
"opt.prob.threshold.OOB"]
if (is.null(prob_threshold) || is.na(prob_threshold)) {
warning("Using default probability threshold: ", prob_threshold_def)
if (is.null(prob_threshold <- prob_threshold_def))
stop("Default probability threshold is NULL")
}
df[, predct_prob_var_name] <- predict(mdl, newdata = df, type = "prob")[, 2]
df[, predct_var_name] <-
factor(levels(df[, glb_rsp_var])[
(df[, predct_prob_var_name] >=
prob_threshold) * 1 + 1], levels(df[, glb_rsp_var]))
# if (verbose) print(myplot_scatter(df, glb_rsp_var, predct_var_name) +
# facet_wrap(reformulate(glbFeatsCategory), scales = "free") +
# stat_smooth(method="glm"))
df[, predct_error_var_name] <- df[, predct_var_name] != df[, glb_rsp_var]
# if (verbose) print(myplot_scatter(df, predct_var_name, predct_error_var_name) +
# #facet_wrap(reformulate(glbFeatsCategory), scales = "free") +
# stat_smooth(method="auto"))
# if (verbose) print(myplot_scatter(df, glb_rsp_var, predct_error_var_name) +
# #facet_wrap(reformulate(glbFeatsCategory), scales = "free") +
# stat_smooth(method="glm"))
# if prediction is a TP (true +ve), measure distance from 1.0
tp <- which((df[, predct_var_name] == df[, glb_rsp_var]) &
(df[, predct_var_name] == levels(df[, glb_rsp_var])[2]))
df[tp, predct_erabs_var_name] <- abs(1 - df[tp, predct_prob_var_name])
#rowIx <- which.max(df[tp, predct_erabs_var_name]); df[tp, c(glbFeatsId, glb_rsp_var, predct_var_name, predct_prob_var_name, predct_erabs_var_name)][rowIx, ]
# if prediction is a TN (true -ve), measure distance from 0.0
tn <- which((df[, predct_var_name] == df[, glb_rsp_var]) &
(df[, predct_var_name] == levels(df[, glb_rsp_var])[1]))
df[tn, predct_erabs_var_name] <- abs(0 - df[tn, predct_prob_var_name])
#rowIx <- which.max(df[tn, predct_erabs_var_name]); df[tn, c(glbFeatsId, glb_rsp_var, predct_var_name, predct_prob_var_name, predct_erabs_var_name)][rowIx, ]
# if prediction is a FP (flse +ve), measure distance from 0.0
fp <- which((df[, predct_var_name] != df[, glb_rsp_var]) &
(df[, predct_var_name] == levels(df[, glb_rsp_var])[2]))
df[fp, predct_erabs_var_name] <- abs(0 - df[fp, predct_prob_var_name])
#rowIx <- which.max(df[fp, predct_erabs_var_name]); df[fp, c(glbFeatsId, glb_rsp_var, predct_var_name, predct_prob_var_name, predct_erabs_var_name)][rowIx, ]
# if prediction is a FN (flse -ve), measure distance from 1.0
fn <- which((df[, predct_var_name] != df[, glb_rsp_var]) &
(df[, predct_var_name] == levels(df[, glb_rsp_var])[1]))
df[fn, predct_erabs_var_name] <- abs(1 - df[fn, predct_prob_var_name])
#rowIx <- which.max(df[fn, predct_erabs_var_name]); df[fn, c(glbFeatsId, glb_rsp_var, predct_var_name, predct_prob_var_name, predct_erabs_var_name)][rowIx, ]
if (verbose) print(head(orderBy(reformulate(c("-", predct_erabs_var_name)), df)))
df[, predct_accurate_var_name] <- (df[, glb_rsp_var] == df[, predct_var_name])
}
if (glb_is_classification && !glb_is_binomial) {
df[, predct_var_name] <- predict(mdl, newdata = df, type = "raw")
probCls <- predict(mdl, newdata = df, type = "prob")
df[, predct_prob_var_name] <- NA
for (cls in names(probCls)) {
mask <- (df[, predct_var_name] == cls)
df[mask, predct_prob_var_name] <- probCls[mask, cls]
}
if (verbose) print(myplot_histogram(df, predct_prob_var_name,
fill_col_name = predct_var_name))
if (verbose) print(myplot_histogram(df, predct_prob_var_name,
facet_frmla = paste0("~", glb_rsp_var)))
df[, predct_error_var_name] <- df[, predct_var_name] != df[, glb_rsp_var]
# if prediction is erroneous, measure predicted class prob from actual class prob
df[, predct_erabs_var_name] <- 0
for (cls in names(probCls)) {
mask <- (df[, glb_rsp_var] == cls) & (df[, predct_error_var_name])
df[mask, predct_erabs_var_name] <- probCls[mask, cls]
}
df[, predct_accurate_var_name] <- (df[, glb_rsp_var] == df[, predct_var_name])
}
return(df)
}
#stop(here"); glb2Sav(); glbObsAll <- savObsAll; glbObsTrn <- savObsTrn; glbObsFit <- savObsFit; glbObsOOB <- savObsOOB; sav_models_df <- glb_models_df; glb_models_df <- sav_models_df; glb_featsimp_df <- sav_featsimp_df
myget_category_stats <- function(obs_df, mdl_id, label) {
require(dplyr)
require(lazyeval)
predct_var_name <- mygetPredictIds(glb_rsp_var, mdl_id)$value
predct_error_var_name <- mygetPredictIds(glb_rsp_var, mdl_id)$err.abs
if (!predct_var_name %in% names(obs_df))
obs_df <- glb_get_predictions(obs_df, mdl_id, glb_rsp_var)
tmp_obs_df <- obs_df[, c(glbFeatsCategory, glb_rsp_var,
predct_var_name, predct_error_var_name)]
# tmp_obs_df <- obs_df %>%
# dplyr::select_(glbFeatsCategory, glb_rsp_var, predct_var_name, predct_error_var_name)
#dplyr::rename(startprice.log10.predict.RFE.X.glmnet.err=error_abs_OOB)
names(tmp_obs_df)[length(names(tmp_obs_df))] <- paste0("err.abs.", label)
ret_ctgry_df <- tmp_obs_df %>%
dplyr::group_by_(glbFeatsCategory) %>%
dplyr::summarise_(#interp(~sum(abs(var)), var=as.name(glb_rsp_var)),
interp(~sum(var), var=as.name(paste0("err.abs.", label))),
interp(~mean(var), var=as.name(paste0("err.abs.", label))),
interp(~n()))
names(ret_ctgry_df) <- c(glbFeatsCategory,
#paste0(glb_rsp_var, ".abs.", label, ".sum"),
paste0("err.abs.", label, ".sum"),
paste0("err.abs.", label, ".mean"),
paste0(".n.", label))
ret_ctgry_df <- dplyr::ungroup(ret_ctgry_df)
#colSums(ret_ctgry_df[, -grep(glbFeatsCategory, names(ret_ctgry_df))])
return(ret_ctgry_df)
}
#print(colSums((ctgry_df <- myget_category_stats(obs_df=glbObsFit, mdl_id="", label="fit"))[, -grep(glbFeatsCategory, names(ctgry_df))]))
if (!is.null(glb_mdl_ensemble)) {
fit.models_2_chunk_df <- myadd_chunk(fit.models_2_chunk_df,
paste0("fit.models_2_", mdl_id_pfx), major.inc = TRUE,
label.minor = "ensemble")
mdl_id_pfx <- "Ensemble"
if (#(glb_is_regression) |
((glb_is_classification) & (!glb_is_binomial)))
stop("Ensemble models not implemented yet for multinomial classification")
mygetEnsembleAutoMdlIds <- function() {
tmp_models_df <- orderBy(glbgetModelSelectFormula(), glb_models_df)
row.names(tmp_models_df) <- tmp_models_df$id
mdl_threshold_pos <-
min(which(grepl("MFO|Random|Baseline", tmp_models_df$id))) - 1
mdlIds <- tmp_models_df$id[1:mdl_threshold_pos]
return(mdlIds[!grepl("Ensemble", mdlIds)])
}
if (glb_mdl_ensemble == "auto") {
glb_mdl_ensemble <- mygetEnsembleAutoMdlIds()
mdl_id_pfx <- paste0(mdl_id_pfx, ".auto")
} else if (grepl("^%<d-%", glb_mdl_ensemble)) {
glb_mdl_ensemble <- eval(parse(text =
str_trim(unlist(strsplit(glb_mdl_ensemble, "%<d-%"))[2])))
}
for (mdl_id in glb_mdl_ensemble) {
if (!(mdl_id %in% names(glb_models_lst))) {
warning("Model ", mdl_id, " in glb_model_ensemble not found !")
next
}
glbObsFit <- glb_get_predictions(df = glbObsFit, mdl_id, glb_rsp_var)
glbObsOOB <- glb_get_predictions(df = glbObsOOB, mdl_id, glb_rsp_var)
}
#mdl_id_pfx <- "Ensemble.RFE"; mdlId <- paste0(mdl_id_pfx, ".glmnet")
#glb_mdl_ensemble <- gsub(mygetPredictIds$value, "", grep("RFE\\.X\\.(?!Interact)", row.names(glb_featsimp_df), perl = TRUE, value = TRUE), fixed = TRUE)
#varImp(glb_models_lst[[mdlId]])
#cor_df <- data.frame(cor=cor(glbObsFit[, glb_rsp_var], glbObsFit[, paste(mygetPredictIds$value, glb_mdl_ensemble)], use="pairwise.complete.obs"))
#glbObsFit <- glb_get_predictions(df=glbObsFit, "Ensemble.glmnet", glb_rsp_var);print(colSums((ctgry_df <- myget_category_stats(obs_df=glbObsFit, mdl_id="Ensemble.glmnet", label="fit"))[, -grep(glbFeatsCategory, names(ctgry_df))]))
### bid0_sp
# Better than MFO; models.n=28; min.RMSE.fit=0.0521233; err.abs.fit.sum=7.3631895
# old: Top x from auto; models.n= 5; min.RMSE.fit=0.06311047; err.abs.fit.sum=9.5937080
# RFE only ; models.n=16; min.RMSE.fit=0.05148588; err.abs.fit.sum=7.2875091
# RFE subset only ;models.n= 5; min.RMSE.fit=0.06040702; err.abs.fit.sum=9.059088
# RFE subset only ;models.n= 9; min.RMSE.fit=0.05933167; err.abs.fit.sum=8.7421288
# RFE subset only ;models.n=15; min.RMSE.fit=0.0584607; err.abs.fit.sum=8.5902066
# RFE subset only ;models.n=17; min.RMSE.fit=0.05496899; err.abs.fit.sum=8.0170431
# RFE subset only ;models.n=18; min.RMSE.fit=0.05441577; err.abs.fit.sum=7.837223
# RFE subset only ;models.n=16; min.RMSE.fit=0.05441577; err.abs.fit.sum=7.837223
### bid0_sp
### bid1_sp
# "auto"; err.abs.fit.sum=76.699774; min.RMSE.fit=0.2186429
# "RFE.X.*"; err.abs.fit.sum=; min.RMSE.fit=0.221114
### bid1_sp
indepVar <- paste(mygetPredictIds(glb_rsp_var)$value, glb_mdl_ensemble, sep = "")
if (glb_is_classification)
indepVar <- paste(indepVar, ".prob", sep = "")
# Some models in glb_mdl_ensemble might not be fitted e.g. RFE.X.Interact
indepVar <- intersect(indepVar, names(glbObsFit))
# indepVar <- grep(mygetPredictIds(glb_rsp_var)$value, names(glbObsFit), fixed=TRUE, value=TRUE)
# if (glb_is_regression)
# indepVar <- indepVar[!grepl("(err\\.abs|accurate)$", indepVar)]
# if (glb_is_classification && glb_is_binomial)
# indepVar <- grep("prob$", indepVar, value=TRUE) else
# indepVar <- indepVar[!grepl("err$", indepVar)]
#rfe_fit_ens_results <- myrun_rfe(glbObsFit, indepVar)
for (method in c("glm", "glmnet")) {
for (trainControlMethod in
c("boot", "boot632", "cv", "repeatedcv"
#, "LOOCV" # tuneLength * nrow(fitDF)
, "LGOCV", "adaptive_cv"
#, "adaptive_boot" #error: adaptive$min should be less than 3
#, "adaptive_LGOCV" #error: adaptive$min should be less than 3
)) {
#sav_models_df <- glb_models_df; all.equal(sav_models_df, glb_models_df)
#glb_models_df <- sav_models_df; print(glb_models_df$id)
if ((method == "glm") && (trainControlMethod != "repeatedcv"))
# glm used only to identify outliers
next
ret_lst <- myfit_mdl(
mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = paste0(mdl_id_pfx, ".", trainControlMethod),
type = glb_model_type, tune.df = NULL,
trainControl.method = trainControlMethod,
trainControl.number = glb_rcv_n_folds,
trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = method)),
indepVar = indepVar, rsp_var = glb_rsp_var,
fit_df = glbObsFit, OOB_df = glbObsOOB)
}
}
dsp_models_df <- glbgetDisplayModelsDf()
}
if (is.null(glbMdlSelId))
glbMdlSelId <- dsp_models_df[1, "id"] else
print(sprintf("User specified selection: %s", glbMdlSelId))
# knitr crashes sometimes with plot.glmnet
if (!(is.null(knitr::opts_current$get(name = 'label'))) &&
(myparseMdlId(glbMdlSelId)$alg == "glmnet"))
print(glb_sel_mdl <- glb_models_lst[[glbMdlSelId]]) else
myprint_mdl(glb_sel_mdl <- glb_models_lst[[glbMdlSelId]])
# From here to save(), this should all be in one function
# these are executed in the same seq twice more:
# fit.data.training & predict.data.new chunks
print(sprintf("%s fit prediction diagnostics:", glbMdlSelId))
glbObsFit <- glb_get_predictions(df = glbObsFit, mdl_id = glbMdlSelId,
rsp_var = glb_rsp_var)
print(sprintf("%s OOB prediction diagnostics:", glbMdlSelId))
glbObsOOB <- glb_get_predictions(df = glbObsOOB, mdl_id = glbMdlSelId,
rsp_var = glb_rsp_var)
print(glb_featsimp_df <- myget_feats_importance(mdl = glb_sel_mdl, featsimp_df = NULL))
#mdl_id <-"RFE.X.glmnet"; glb_featsimp_df <- myget_feats_importance(glb_models_lst[[mdl_id]], glb_featsimp_df); glb_featsimp_df[, paste0(mdl_id, ".imp")] <- glb_featsimp_df$imp; print(glb_featsimp_df)
#print(head(sbst_featsimp_df <- subset(glb_featsimp_df, is.na(RFE.X.glmnet.imp) | (abs(RFE.X.YeoJohnson.glmnet.imp - RFE.X.glmnet.imp) > 0.0001), select=-imp)))
#print(orderBy(~ -cor.y.abs, subset(glb_feats_df, id %in% c(row.names(sbst_featsimp_df), "startprice.dcm1.is9", "D.weight.post.stop.sum"))))
# Used again in fit.data.training & predict.data.new chunks
glb_analytics_diag_plots <- function(obs_df, mdl_id, prob_threshold=NULL) {
if (!is.null(featsimp_df <- glb_featsimp_df)) {
featsimp_df$feat <- gsub("`(.*?)`", "\\1", row.names(featsimp_df))
featsimp_df$feat.interact <- gsub("(.*?):(.*)", "\\2", featsimp_df$feat)
featsimp_df$feat <- gsub("(.*?):(.*)", "\\1", featsimp_df$feat)
featsimp_df$feat.interact <-
ifelse(featsimp_df$feat.interact == featsimp_df$feat,
NA, featsimp_df$feat.interact)
featsimp_df$feat <-
gsub("(.*?)\\.fctr(.*)", "\\1\\.fctr", featsimp_df$feat)
featsimp_df$feat.interact <-
gsub("(.*?)\\.fctr(.*)", "\\1\\.fctr", featsimp_df$feat.interact)
featsimp_df <- orderBy(~ -imp.max,
summaryBy(imp ~ feat + feat.interact, data=featsimp_df,
FUN=max))
#rex_str=":(.*)"; txt_vctr=tail(featsimp_df$feat); ret_lst <- regexec(rex_str, txt_vctr); ret_lst <- regmatches(txt_vctr, ret_lst); ret_vctr <- sapply(1:length(ret_lst), function(pos_ix) ifelse(length(ret_lst[[pos_ix]]) > 0, ret_lst[[pos_ix]], "")); print(ret_vctr <- ret_vctr[ret_vctr != ""])
featsimp_df <- subset(featsimp_df, !is.na(imp.max))
if (nrow(featsimp_df) > 5) {
warning("Limiting important feature scatter plots to 5 out of ",
nrow(featsimp_df))
featsimp_df <- head(featsimp_df, 5)
}
# if (!all(is.na(featsimp_df$feat.interact)))
# stop("not implemented yet")
rsp_var_out <- mygetPredictIds(glb_rsp_var, mdl_id)$value
if (grepl("pca", myparseMdlId(mdl_id)$preProc, fixed = TRUE)) {
indepVar <- unlist(strsplit(glb_models_df[glb_models_df$id == mdl_id, "feats"], ","))
vectorizedObsMtx <- myget_vectorized_obs_df(obs_df, rsp_var = glb_rsp_var,
indep_vars = indepVar)
if (!inherits(vectorizedObsMtx, "matrix")) {
vectorizedObsMtx[, glb_rsp_var] <- as.numeric(vectorizedObsMtx[, glb_rsp_var])
vectorizedObsMtx <- as.matrix(vectorizedObsMtx)
}
rotationMtx <- glb_models_lst[[mdl_id]]$preProcess$rotation
pcaobs_df <- as.data.frame(vectorizedObsMtx[, dimnames(rotationMtx)[[1]]] %*%
rotationMtx)
# pcaobs_df[, glb_rsp_var] <- obs_df[, glb_rsp_var]
# pcaobs_df[, rsp_var_out] <- obs_df[, rsp_var_out]
# pcaobs_df[, glbFeatsId] <- obs_df[, glbFeatsId]
obs_df <- cbind(obs_df, pcaobs_df)
}
for (var in featsimp_df$feat) {
plot_df <- melt(obs_df, id.vars = var,
measure.vars = c(glb_rsp_var, rsp_var_out))
print(myplot_scatter(plot_df, var, "value", colorcol_name = "variable",
facet_colcol_name = "variable", jitter = TRUE) +
guides(color = FALSE))
}
}
if (glb_is_regression) {
if (is.null(featsimp_df) || (nrow(featsimp_df) == 0))
warning("No important features in glb_fin_mdl") else
print(myplot_prediction_regression(df=obs_df,
feat_x=ifelse(nrow(featsimp_df) > 1, featsimp_df$feat[2],
".rownames"),
feat_y=featsimp_df$feat[1],
rsp_var=glb_rsp_var, rsp_var_out=rsp_var_out,
id_vars=glbFeatsId)
# + facet_wrap(reformulate(featsimp_df$feat[2])) # if [1 or 2] is a factor
# + geom_point(aes_string(color="<col_name>.fctr")) # to color the plot
)
}
if (glb_is_classification) {
require(lazyeval)
if (is.null(featsimp_df) || (nrow(featsimp_df) == 0))
warning("No features in selected model are statistically important") else
print(myplot_prediction_classification(df = obs_df,
feat_x = ifelse(nrow(featsimp_df) > 1,
featsimp_df$feat[2], ".rownames"),
feat_y = featsimp_df$feat[1],
rsp_var = glb_rsp_var,
rsp_var_out = rsp_var_out,
id_vars = glbFeatsId,
prob_threshold = prob_threshold))
}
}
if (glb_is_classification && glb_is_binomial)
glb_analytics_diag_plots(obs_df = glbObsOOB, mdl_id = glbMdlSelId,
prob_threshold = glb_models_df[glb_models_df$id == glbMdlSelId,
"opt.prob.threshold.OOB"]) else
glb_analytics_diag_plots(obs_df = glbObsOOB, mdl_id = glbMdlSelId)
if (!is.null(glbFeatsCategory)) {
glbLvlCategory <- merge(glbLvlCategory,
myget_category_stats(obs_df = glbObsFit, mdl_id = glbMdlSelId,
label = "fit"),
by = glbFeatsCategory, all = TRUE)
row.names(glbLvlCategory) <- glbLvlCategory[, glbFeatsCategory]
glbLvlCategory <- merge(glbLvlCategory,
myget_category_stats(obs_df = glbObsOOB, mdl_id = glbMdlSelId,
label="OOB"),
#by=glbFeatsCategory, all=TRUE) glb_ctgry-df already contains .n.OOB ?
all = TRUE)
row.names(glbLvlCategory) <- glbLvlCategory[, glbFeatsCategory]
if (any(grepl("OOB", glbMdlMetricsEval)))
print(orderBy(~-err.abs.OOB.mean, glbLvlCategory)) else
print(orderBy(~-err.abs.fit.mean, glbLvlCategory))
print(colSums(glbLvlCategory[, -grep(glbFeatsCategory, names(glbLvlCategory))]))
}
write.csv(glbObsOOB[, c(glbFeatsId,
grep(glb_rsp_var, names(glbObsOOB), fixed=TRUE, value=TRUE))],
paste0(gsub(".", "_", paste0(glbOut$pfx, glbMdlSelId), fixed=TRUE),
"_OOBobs.csv"), row.names=FALSE)
fit.models_2_chunk_df <-
myadd_chunk(NULL, "fit.models_2_bgn", label.minor = "teardown")
glb_chunks_df <- myadd_chunk(glb_chunks_df, "fit.models", major.inc=FALSE)
# if (sum(is.na(glbObsAll$D.P.http)) > 0)
# stop("fit.models_3: Why is this happening ?")
#stop(here"); glb2Sav()
sync_glb_obs_df <- function() {
# Merge or cbind ?
for (col in setdiff(names(glbObsFit), names(glbObsTrn)))
glbObsTrn[glbObsTrn$.lcn == "Fit", col] <<- glbObsFit[, col]
for (col in setdiff(names(glbObsFit), names(glbObsAll)))
glbObsAll[glbObsAll$.lcn == "Fit", col] <<- glbObsFit[, col]
if (all(is.na(glbObsNew[, glb_rsp_var])))
for (col in setdiff(names(glbObsOOB), names(glbObsTrn)))
glbObsTrn[glbObsTrn$.lcn == "OOB", col] <<- glbObsOOB[, col]
for (col in setdiff(names(glbObsOOB), names(glbObsAll)))
glbObsAll[glbObsAll$.lcn == "OOB", col] <<- glbObsOOB[, col]
}
sync_glb_obs_df()
print(setdiff(names(glbObsNew), names(glbObsAll)))
replay.petrisim(pn = glb_analytics_pn,
replay.trans = (glb_analytics_avl_objs <- c(glb_analytics_avl_objs,
"model.selected")), flip_coord = TRUE)
glb_chunks_df <- myadd_chunk(glb_chunks_df, "fit.data.training", major.inc = TRUE)
1.1: fit models#load(paste0(glb_inp_pfx, "dsk.RData"))
if (!is.null(glbMdlFinId) && (glbMdlFinId %in% names(glb_models_lst))) {
warning("Final model same as user selected model")
glb_fin_mdl <- glb_models_lst[[glbMdlFinId]]
} else
# if (nrow(glbObsFit) + length(glbObsFitOutliers) == nrow(glbObsTrn))
if (!all(is.na(glbObsNew[, glb_rsp_var]))) {
warning("Final model same as glbMdlSelId")
glbMdlFinId <- paste0("Final.", glbMdlSelId)
glb_fin_mdl <- glb_sel_mdl
glb_models_lst[[glbMdlFinId]] <- glb_fin_mdl
mdlDf <- glb_models_df[glb_models_df$id == glbMdlSelId, ]
mdlDf$id <- glbMdlFinId
glb_models_df <- rbind(glb_models_df, mdlDf)
} else {
if (myparseMdlId(glbMdlSelId)$family == "RFE.X") {
indepVar <- mygetIndepVar(glb_feats_df)
trnRFEResults <-
myrun_rfe(glbObsTrn, indepVar, glbRFESizes[["Final"]])
if (!isTRUE(all.equal(sort(predictors(trnRFEResults)),
sort(predictors(glbRFEResults))))) {
print("Diffs predictors(trnRFEResults) vs. predictors(glbRFEResults):")
print(setdiff(predictors(trnRFEResults), predictors(glbRFEResults)))
print("Diffs predictors(glbRFEResults) vs. predictors(trnRFEResults):")
print(setdiff(predictors(glbRFEResults), predictors(trnRFEResults)))
}
}
if (grepl("Ensemble", glbMdlSelId)) {
# Find which models are relevant
mdlimp_df <- subset(myget_feats_importance(glb_sel_mdl), imp > 5)
# Fit selected models on glbObsTrn
for (mdl_id in gsub(".prob", "",
gsub(mygetPredictIds(glb_rsp_var)$value, "", row.names(mdlimp_df), fixed = TRUE),
fixed = TRUE)) {
mdl_id_components <- unlist(strsplit(mdl_id, "[.]"))
mdlIdPfx <- paste0(c(head(mdl_id_components, -1), "Train"),
collapse = ".")
if (grepl("RFE\\.X\\.", mdlIdPfx))
mdlIndepVars <- myadjustInteractionFeats(glb_feats_df, myextract_actual_feats(
predictors(trnRFEResults))) else
mdlIndepVars <- trim(unlist(
strsplit(glb_models_df[glb_models_df$id == mdl_id, "feats"], "[,]")))
ret_lst <-
myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = mdlIdPfx,
type = glb_model_type, tune.df = glbMdlTuneParams,
trainControl.method = "repeatedcv",
trainControl.number = glb_rcv_n_folds,
trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = tail(mdl_id_components, 1))),
indepVar = mdlIndepVars,
rsp_var = glb_rsp_var,
fit_df = glbObsTrn, OOB_df = NULL)
glbObsTrn <- glb_get_predictions(df = glbObsTrn,
mdl_id = tail(glb_models_df$id, 1),
rsp_var = glb_rsp_var,
prob_threshold_def =
subset(glb_models_df, id == mdl_id)$opt.prob.threshold.OOB)
glbObsNew <- glb_get_predictions(df = glbObsNew,
mdl_id = tail(glb_models_df$id, 1),
rsp_var = glb_rsp_var,
prob_threshold_def =
subset(glb_models_df, id == mdl_id)$opt.prob.threshold.OOB)
}
}
# "Final" model
if ((model_method <- glb_sel_mdl$method) == "custom")
# get actual method from the mdl_id
model_method <- tail(unlist(strsplit(glbMdlSelId, "[.]")), 1)
if (grepl("Ensemble", glbMdlSelId)) {
# Find which models are relevant
mdlimp_df <- subset(myget_feats_importance(glb_sel_mdl), imp > 5)
if (glb_is_classification && glb_is_binomial)
indepVar <- gsub("(.*)\\.(.*)\\.prob", "\\1\\.Train\\.\\2\\.prob",
row.names(mdlimp_df)) else
indepVar <- gsub("(.*)\\.(.*)", "\\1\\.Train\\.\\2",
row.names(mdlimp_df))
} else
if (grepl("RFE.X", glbMdlSelId, fixed = TRUE)) {
# indepVar <- myextract_actual_feats(predictors(trnRFEResults))
indepVar <- myextract_actual_feats(predictors(glbRFEResults))
} else indepVar <-
trim(unlist(strsplit(glb_models_df[glb_models_df$id ==
glbMdlSelId
, "feats"], "[,]")))
# if (!is.null(glbMdlPreprocMethods) &&
# ((match_pos <- regexpr(gsub(".", "\\.",
# paste(glbMdlPreprocMethods, collapse = "|"),
# fixed = TRUE), glbMdlSelId)) != -1))
# ths_preProcess <- str_sub(glbMdlSelId, match_pos,
# match_pos + attr(match_pos, "match.length") - 1) else
# ths_preProcess <- NULL
# mdl_id_pfx <- ifelse(grepl("Ensemble", glbMdlSelId),
# "Final.Ensemble", "Final")
mdl_id_pfx <- paste("Final", myparseMdlId(glbMdlSelId)$family, sep = ".")
trnobs_df <- glbObsTrn
if (!is.null(glbObsTrnOutliers[[mdl_id_pfx]])) {
trnobs_df <- glbObsTrn[!(glbObsTrn[, glbFeatsId] %in% glbObsTrnOutliers[[mdl_id_pfx]]), ]
print(sprintf("Outliers removed: %d", nrow(glbObsTrn) - nrow(trnobs_df)))
print(setdiff(glbObsTrn[, glbFeatsId], trnobs_df[, glbFeatsId]))
}
# Force fitting of Final.glm to identify outliers
method_vctr <- unique(c(myparseMdlId(glbMdlSelId)$alg, glbMdlFamilies[["Final"]]))
for (method in method_vctr) {
#source("caret_nominalTrainWorkflow.R")
# glmnet requires at least 2 indep vars
if ((length(indepVar) == 1) && (method %in% "glmnet"))
next
ret_lst <-
myfit_mdl(mdl_specs_lst = myinit_mdl_specs_lst(mdl_specs_lst = list(
id.prefix = mdl_id_pfx,
type = glb_model_type, trainControl.method = "repeatedcv",
trainControl.number = glb_rcv_n_folds,
trainControl.repeats = glb_rcv_n_repeats,
trainControl.classProbs = glb_is_classification,
trainControl.summaryFunction = glbMdlMetricSummaryFn,
trainControl.allowParallel = glbMdlAllowParallel,
train.metric = glbMdlMetricSummary,
train.maximize = glbMdlMetricMaximize,
train.method = method,
train.preProcess = myparseMdlId(glbMdlSelId)$preProcess)),
indepVar = indepVar, rsp_var = glb_rsp_var,
fit_df = trnobs_df, OOB_df = NULL)
if ((length(method_vctr) == 1) || (method != "glm")) {
glb_fin_mdl <- glb_models_lst[[length(glb_models_lst)]]
glbMdlFinId <- glb_models_df[length(glb_models_lst), "id"]
}
}
}
rm(ret_lst)
glb_chunks_df <- myadd_chunk(glb_chunks_df, "fit.data.training", major.inc=FALSE)
#stop(here"); glb2Sav()
if (glb_is_classification && glb_is_binomial)
prob_threshold <- glb_models_df[glb_models_df$id == glbMdlSelId,
"opt.prob.threshold.OOB"] else
prob_threshold <- NULL
if (grepl("Ensemble", glbMdlFinId)) {
# Get predictions for each model in ensemble; Outliers that have been moved to OOB might not have been predicted yet
mdlEnsembleComps <- unlist(str_split(subset(glb_models_df,
id == glbMdlFinId)$feats, ","))
if (glb_is_classification && glb_is_binomial)
mdlEnsembleComps <- gsub("\\.prob$", "", mdlEnsembleComps)
mdlEnsembleComps <- gsub(paste0("^",
gsub(".", "\\.", mygetPredictIds(glb_rsp_var)$value, fixed = TRUE)),
"", mdlEnsembleComps)
for (mdl_id in mdlEnsembleComps) {
glbObsTrn <- glb_get_predictions(df = glbObsTrn, mdl_id = mdl_id,
rsp_var = glb_rsp_var,
prob_threshold_def = prob_threshold)
glbObsNew <- glb_get_predictions(df = glbObsNew, mdl_id = mdl_id,
rsp_var = glb_rsp_var,
prob_threshold_def = prob_threshold)
}
}
glbObsTrn <- glb_get_predictions(df = glbObsTrn, mdl_id = glbMdlFinId,
rsp_var = glb_rsp_var,
prob_threshold_def = prob_threshold)
glb_featsimp_df <- myget_feats_importance(mdl=glb_fin_mdl,
featsimp_df=glb_featsimp_df)
#glb_featsimp_df[, paste0(glbMdlFinId, ".imp")] <- glb_featsimp_df$imp
print(glb_featsimp_df)
if (glb_is_classification && glb_is_binomial)
glb_analytics_diag_plots(obs_df=glbObsTrn, mdl_id=glbMdlFinId,
prob_threshold=glb_models_df[glb_models_df$id == glbMdlSelId,
"opt.prob.threshold.OOB"]) else
glb_analytics_diag_plots(obs_df=glbObsTrn, mdl_id=glbMdlFinId)
dsp_feats_vctr <- c(NULL)
for(var in grep(".imp", names(glb_feats_df), fixed=TRUE, value=TRUE))
dsp_feats_vctr <- union(dsp_feats_vctr,
glb_feats_df[!is.na(glb_feats_df[, var]), "id"])
# print(glbObsTrn[glbObsTrn$UniqueID %in% FN_OOB_ids,
# grep(glb_rsp_var, names(glbObsTrn), value=TRUE)])
print(setdiff(names(glbObsTrn), names(glbObsAll)))
for (col in setdiff(names(glbObsTrn), names(glbObsAll)))
# Merge or cbind ?
glbObsAll[glbObsAll$.src == "Train", col] <- glbObsTrn[, col]
print(setdiff(names(glbObsFit), names(glbObsAll)))
print(setdiff(names(glbObsOOB), names(glbObsAll)))
for (col in setdiff(names(glbObsOOB), names(glbObsAll)))
# Merge or cbind ?
glbObsAll[glbObsAll$.lcn == "OOB", col] <- glbObsOOB[, col]
print(setdiff(names(glbObsNew), names(glbObsAll)))
#glb2Sav(); all.equal(savObsAll, glbObsAll); all.equal(sav_models_lst, glb_models_lst)
#load(file = paste0(glbOut$pfx, "dsk_knitr.RData"))
#cmpCols <- names(glbObsAll)[!grepl("\\.Final\\.", names(glbObsAll))]; all.equal(savObsAll[, cmpCols], glbObsAll[, cmpCols]); all.equal(savObsAll[, "H.P.http"], glbObsAll[, "H.P.http"]);
replay.petrisim(pn = glb_analytics_pn,
replay.trans = (glb_analytics_avl_objs <- c(glb_analytics_avl_objs,
"data.training.all.prediction","model.final")), flip_coord = TRUE)
glb_chunks_df <- myadd_chunk(glb_chunks_df, "predict.data.new", major.inc = TRUE)
1.1: fit modelsNull Hypothesis (\(\sf{H_{0}}\)): mpg is not impacted by am_fctr.
The variance by am_fctr appears to be independent. #{r q1, cache=FALSE} # print(t.test(subset(cars_df, am_fctr == "automatic")$mpg, # subset(cars_df, am_fctr == "manual")$mpg, # var.equal=FALSE)$conf) # We reject the null hypothesis i.e. we have evidence to conclude that am_fctr impacts mpg (95% confidence). Manual transmission is better for miles per gallon versus automatic transmission.
## label step_major step_minor label_minor bgn end elapsed
## 1 fit.models_1 1 0 0 9.653 1653.341 1643.688
## duration
## 1 1643.688
## [1] "Total Elapsed Time: 1,653.341 secs"
## label step_major step_minor label_minor bgn
## 9 fit.models_1_preProc 1 8 preProc 277.140
## 6 fit.models_1_All.X.Inc 1 5 glmnet 148.981
## 1 fit.models_1_bgn 1 0 setup 86.224
## 8 fit.models_1_RFE.X 1 7 glmnet 238.746
## 5 fit.models_1_All.X.Inc 1 4 setup 148.797
## 7 fit.models_1_RFE.X 1 6 setup 238.738
## 2 fit.models_1_All.X 1 1 setup 148.783
## 3 fit.models_1_All.X 1 2 glmnet 148.788
## 4 fit.models_1_All.X 1 3 glm 148.793
## end elapsed duration
## 9 1653.332 1376.192 1376.192
## 6 238.737 89.756 89.756
## 1 148.782 62.559 62.558
## 8 277.139 38.393 38.393
## 5 148.980 0.183 0.183
## 7 238.745 0.007 0.007
## 2 148.788 0.005 0.005
## 3 148.792 0.004 0.004
## 4 148.796 0.003 0.003
## [1] "Total Elapsed Time: 1,653.332 secs"